jimmylv.github.io icon indicating copy to clipboard operation
jimmylv.github.io copied to clipboard

教程:写文章分享使用 create-react-app 统一 build infrastructure 的经验

Open JimmyLv opened this issue 7 years ago • 2 comments

项目纵向拆分

⓵ 定义目标和原则

  • 技术牛逼(编程、架构、工程)
  • 构建影响力

⓶ 展望结果(OKRs)

  • 发布一篇博客文章(同步至「前端的逆袭」知乎专栏)

⓷ 头脑风暴(发散)

⓸ 组织整理(收敛)

⓹ 明确「下一步行动」

  • 总结工程实践的缘由和好处(有时候 benefit 这样的词还真找不到一个好的中文词)
  • 代码实践与示例 #277

JimmyLv avatar Aug 18 '17 09:08 JimmyLv

via Automation without config | Kent C. Dodds Blog:

For PayPal however, the goal is to make developers more productive at shipping better products. This is why it comes with a great default configuration so most of the time you shouldn't need to configure anything. Big productivity boost. At the same time, we do need to cover more use cases if we're going to provide our engineers real value, so while create-react-app doesn't allow for custom configuration, paypal-scripts does.

There is a project called react-app-rewired by Tim Arney. It's awesome. However, I've taken a different approach to making paypal-scripts configurable. Rather than allowing you to have a config file that accepts config and lets you return your "rewired" config, paypal-scripts will assume that you want the built-in configuration unless you've configured things yourself. For example, if you add a .babelrc file or a babel property to your package.json, then paypal-scripts will use your babel configuration rather than the built-in config. This makes things much more predictable and less magical. ✨

To make things even better, paypal-scripts exposes all of its configuration so you can compose your custom config with the built-in config ⚡️. So if you wanted to add a custom babel plugin it's as easy as adding this to your package.json:

"babel": {
  "presets": ["paypal-scripts/babel"],
  "plugins": ["glamorous-displayname"]
}

JimmyLv avatar Aug 20 '18 14:08 JimmyLv

使用 @vue/cli + vue.config.js 作为 monorepo 中 cs-front-end/cli 子 package 作为封装,未来可以跟组件库共同发布出去作为 模板开发者 的工具包 Kit。

JimmyLv avatar Aug 20 '18 14:08 JimmyLv

Next.js 集大成者

JimmyLv avatar Feb 05 '23 16:02 JimmyLv