babel-preset-c7n
v0.0.2
Published
Babel preset used by Choerodon
Downloads
4
Readme
babel-preset-c7n
This package includes the Babel preset used by choerodon, Please refer to its documentation:
Usage
If you want to use this Babel preset in a project, you can install it with the following steps.
First, install Babel.
Then install babel-preset-c7n.
npm install babel-preset-c7n --save-dev
Then create a file named .babelrc
with following contents in the root folder of your project:
{
"presets": ["c7n-app"]
}
This preset uses the useBuiltIns
option with transform-object-rest-spread and transform-react-jsx, which assumes that Object.assign
is available or polyfilled.
Usage with TypeScript
Make sure you have a tsconfig.json
file at the root directory. You can also use the typescript
option on .babelrc
:
{
"presets": [["c7n-app", { "typescript": true }]]
}