@brojs/create
v2.0.0
Published
Инструмент для создания новых проектов BroJS.
Readme
@brojs/create
Инструмент для создания новых проектов BroJS.
Использование
npm init @brojsСоздание с определенным шаблоном
brojs create my-project --template microСоздание с дополнительными опциями
brojs create my-project --template micro-adv --typescript --testingДоступные команды
create
Создает новый проект на основе выбранного шаблона.
brojs create [имя-проекта] [опции]Опции:
--template- Выбор шаблона проекта
init
Доступные шаблоны
micro
Базовый шаблон микрофронтенда.
brojs create my-project --template micromicro-adv
Расширенный шаблон микрофронтенда.
brojs create my-project --template micro-advmicro-empty
Пустой шаблон микрофронтенда.
brojs create my-project --template micro-emptyКонфигурация
package.json
{
"name": "my-project",
"version": "1.0.0",
"description": "My BroJS project",
"author": "John Doe",
"license": "MIT",
"scripts": {
"dev": "webpack serve --mode development",
"build": "webpack --mode production",
"test": "jest"
},
"dependencies": {
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@brojs/webpack-config": "^1.8.3",
"@brojs/dev-server": "^1.8.4"
}
}webpack.config.js
const webpackConfig = require('@brojs/webpack-config');
module.exports = webpackConfig({
entry: './src/index.js',
output: {
path: './dist',
filename: '[name].js'
}
});tsconfig.json
{
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "react-jsx",
"baseUrl": "src"
}
}Лицензия
MIT
