🌜
🌞
babel-preset-beidou-server

babel-preset-beidou-server

v2.0.1

Babel preset for Beidou Sever.

npm install babel-preset-beidou-server

README

babel-preset-beidou-server

Babel preset for beidou server side.

This preset includes the following plugins:

  • babel-preset-env
  • babel-preset-react
  • babel-preset-stage-2

Install

Install the CLI and this preset

npm install --save-dev babel-cli babel-preset-beidou-server

Make a .babelrc config file with the preset

echo '{ "presets": ["beidou-server"] }' > .babelrc

Usage

.babelrc

{
  "presets": ["beidou-server"]
}

Via CLI

babel script.js --presets beidou-server

Via Node API

require('babel-core').transform('code', {
  presets: ['beidou-server'],
});

Release Notes

1.0.0
By Qing • Published on March 23, 2018

BREAKING CHANGE

  • Node version must >= 8
  • React/react-dom versions must >= 16
  • Replace koa-webpack-dev-middleware with webpack-dev-server
  • Remove app.helper.resolveResource, use app.helper.asset instead

Features

  • Upgrade to [email protected], support async/await style middlewares
  • All in one manage tool - beidou-cli, including init boilerplate, development, debug, test, build assets, start/stop production app, and so on.
  • Custom view rendering process by view middlewares
  • Support rax isomorphic rendering, see beidou-view-rax
  • Webpack support many frontend resource loaders, see code
  • Webpack support CSS Modules with .module.{css|scss|less} files
  • Dump webpack config to [root]/run directory
  • Custom babel client targets by configuration
  • Handle many reasonable default configs, you may not need a lot of options in your config files, see examples

General

License
MIT
Typescript Types
None found
Tree-shakeable
No

Popularity

GitHub Stargazers
2,732
Community Interest
3,110
Number of Forks
280

Maintenance

Commits
10/219/2202
Last Commit
Open Issues
15
Closed Issues
127
Open Pull Requests
36
Closed Pull Requests
56

Versions

Versions Released
10/219/2201
Latest Version Released
Jan 29, 2019
Current Tags
latest2.0.1
next2.0.0-beta.0

Contributors

njugray
njugray
Commits: 221
weichunpeng
weichunpeng
Commits: 162
devrsi0n
devrsi0n
Commits: 86
justquanyin
justquanyin
Commits: 26
ahungrynoob
ahungrynoob
Commits: 9
xdlrt
xdlrt
Commits: 2
JacksonTian
JacksonTian
Commits: 2
olivewind
olivewind
Commits: 1
lanqy
lanqy
Commits: 1
chenmingjia
chenmingjia
Commits: 1
davidnotes
davidnotes
Commits: 1
weihomechen
weihomechen
Commits: 1
fantasyroot
fantasyroot
Commits: 1
xiangxingchen
xiangxingchen
Commits: 1
kittBoy
kittBoy
Commits: 1