first commit

This commit is contained in:
Iuri Matias 2016-12-10 10:24:01 -05:00
commit e94ae7555b
3 changed files with 31 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
node_modules/

16
index.js Normal file
View File

@ -0,0 +1,16 @@
var babel = require("babel-core");
module.exports = function(embark) {
embark.registerPipeline(function(opts) {
var targetFile = opts.targetFile;
var source = opts.source;
if (targetFile.split('.').slice(-1)[0] !== 'js' ) {
return source;
}
return babel.transform(source, {}).code;
});
};

14
package.json Normal file
View File

@ -0,0 +1,14 @@
{
"name": "embark-babel",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"babel-core": "^6.18.2"
}
}