请查看Bruce FEES或@yangzw/bruce-app的文档
经过两年时间对@yangzw/bruce-app
进行艰苦的迭代,bruce-cli
终于退休,后续不再维护。请大家使用最新版本的bruce-cli
,其内部代码从@yangzw/bruce-app中移植过来,后续bruce-cli
所有版本均和@yangzw/bruce-app
同步,不再区分。
A JS/React Application Automation Build Scaffold With Zero Configuration Out Of The Box
Home Page: https://jowayyoung.github.io/bruce/app
License: MIT License
请查看Bruce FEES或@yangzw/bruce-app的文档
经过两年时间对@yangzw/bruce-app
进行艰苦的迭代,bruce-cli
终于退休,后续不再维护。请大家使用最新版本的bruce-cli
,其内部代码从@yangzw/bruce-app中移植过来,后续bruce-cli
所有版本均和@yangzw/bruce-app
同步,不再区分。
npm run eject可以移除项目对react-scripts的依赖,将webpack,Babel等的配置文件导入进项目中,bruce-cli
是否有类似的功能
create-react-app 文档如下:
npm run eject
Note: this is a one-way operation. Once you eject
, you can’t go back!
If you aren’t satisfied with the build tool and configuration choices, you can eject
at any time. This command will remove the single build dependency from your project.
Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject
will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
You don’t have to ever use eject
. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
为什么我编译的生产代码中引用了 https://cdn.polyfill.io/v2/polyfill.min.js 这个cdn
这个 js 资源只有 2.3k 但是走了这个cdn后需要1s以上的响应时间,严重影响了首屏加载速度,create-react-app 则未发现此问题.
bruce b 选项如下:
? 请选择构建环境 生产环境
? 请确认是否输出ES6代码 Yes
? 请确认是否动态导入垫片 Yes
? 请确认是否哈希文件名称 Yes
? 请确认是否深度压缩文件 Yes
? 请确认是否时间化根目录 Yes
? 请确认是否分析打包结果 Yes
? 请确认是否上传到服务器 No
提示已经build完成了,但是不会打开浏览器
访问http://127.0.0.1:8080/,直接返回Cannot GET /
请教下,mpa的项目怎么玩啊?
有详细的教程吗
在导入element ui后构建会报Module parse failed: Unexpected character ' '的错,找到的答案是要webpack.config.js中module=>rules加上配置规则
在导入ant-design-vue的时候,设置按需加载要配置.babelrc or babel-loader option
所以可以自定义webpack的配置吗?
上午打开vscode,提示Oh My Zsh更新,敲了Y
然后跑bruce b,就出现如下错误:
(node:18651) UnhandledPromiseRejectionWarning: Error: EACCES: permission denied, unlink '/usr/local/lib/node_modules/bruce-cli/.gitattributes'
(Use node --trace-warnings ...
to show where the warning was created)
(node:18651) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:18651) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
到现在还是一脸懵逼,只能向大神求救了
啥时候开放源码?
× Webpack Build
Compiled with some errors in 2.28s
clean-webpack-plugin: pausing due to webpack errors
Hash: c2322a2f782e38b33d58
Version: webpack 4.44.2
Time: 2280ms
Built at: 2020/11/25 下午3:37:17
Asset Size Chunks Chunk Names
vendor.dll.js 125 KiB 0 vendor
Entrypoint vendor = vendor.dll.js
ERROR in vendor.dll.js from UglifyJs
undefined
× 动态链接库构建失败
既然是想开源, 为啥不开放出来,让大家共同学习维护呢
想学习下源码,为什么都是压缩过的?
移除publicPathProd和publicPathTest两个参数,打包文件引用路径统一使用绝对路径
请问这个绝对路径怎么配置?
执行完bruce b之后,全局安装的bruce被卸载了
C:\Users\Administrator\Desktop\app>bruce b
internal/modules/cjs/loader.js:983
throw err;
^
Error: Cannot find module 'C:\node-v12.16.2-win-x64\node_modules\bruce-cli\bin\bruce.js'
�[90m at Function.Module._resolveFilename (internal/modules/cjs/loader.js:980:15)�[39m
�[90m at Function.Module._load (internal/modules/cjs/loader.js:862:27)�[39m
�[90m at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)�[39m
�[90m at internal/main/run_main_module.js:18:47�[39m {
code: �[32m'MODULE_NOT_FOUND'�[39m,
requireStack: []
}
动态链接库构建成功
? 请选择构建环境 开发环境
? 请输入调试端口 9999
? 请确认是否打开浏览器 Yes
? 请确认是否校验CSS No
? 请确认是否校验JS No
然后出现下面错误
图片地址
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.