-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit de0c9fd
Showing
4 changed files
with
83 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.DS_Store | ||
npm-debug.log | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# babel-preset-save | ||
|
||
> A babel preset for transforming your JavaScript for Save.co applications | ||
## Install | ||
|
||
```sh | ||
$ npm install --save-dev babel-preset-save | ||
``` | ||
|
||
## Usage | ||
|
||
### Via `.babelrc` (Recommended) | ||
|
||
**.babelrc** | ||
|
||
```json | ||
{ | ||
"presets": ["save"] | ||
} | ||
``` | ||
|
||
### Via CLI | ||
|
||
```sh | ||
$ babel script.js --presets save | ||
``` | ||
|
||
### Via Node API | ||
|
||
```javascript | ||
require("babel-core").transform("code", { | ||
presets: ["save"] | ||
}); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
module.exports = { | ||
presets: [ | ||
require('modify-babel-preset')('babel-preset-es2015', { | ||
'transform-es2015-classes': { loose: true }, | ||
'transform-es2015-modules-commonjs': { loose: true } | ||
}), | ||
require('babel-preset-react'), | ||
require('babel-preset-stage-0') | ||
], | ||
plugins: [ | ||
[require('babel-plugin-transform-es2015-template-literals'), { spec: true }], | ||
require('babel-plugin-transform-es3-member-expression-literals'), | ||
require('babel-plugin-transform-es3-property-literals'), | ||
require('babel-plugin-transform-jscript'), | ||
require('babel-plugin-transform-exponentiation-operator'), | ||
require('babel-plugin-transform-proto-to-assign'), | ||
require('babel-plugin-transform-decorators-legacy'), | ||
require('babel-plugin-add-module-exports') | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"name": "babel-preset-save", | ||
"author": "iam4x", | ||
"version": "1.0.0", | ||
"description": "babel6 preset for Save.co projects", | ||
"main": "index.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "[email protected]:savemysmartphone/babel-preset-save.git" | ||
}, | ||
"author": "", | ||
"license": "ISC", | ||
"dependencies": { | ||
"babel-plugin-add-module-exports": "^0.1.2", | ||
"babel-plugin-transform-decorators-legacy": "^1.3.4", | ||
"babel-plugin-transform-es3-member-expression-literals": "^6.5.0", | ||
"babel-plugin-transform-es3-property-literals": "^6.5.0", | ||
"babel-plugin-transform-jscript": "^6.5.0", | ||
"babel-plugin-transform-proto-to-assign": "^6.5.0", | ||
"babel-preset-es2015": "^6.5.0", | ||
"babel-preset-react": "^6.5.0", | ||
"babel-preset-stage-0": "^6.5.0", | ||
"modify-babel-preset": "^1.2.0" | ||
} | ||
} |