プラグイン作成の準備
$ mkdir babel-plugin-transform-sample
$ cd babel-plugin-transform-sample
$ npm initimport runner from 'babel-helper-plugin-test-runner';
runner(__dirname);{
"plugins": ["transform-sample"]
}{
"name": "babel-plugin-transform-sample",
"main": "lib/index.js",
"scripts": {
"build": "babel -d lib src",
"require-self": "npm run build && require-self",
"mocha": "npm run require-self && mocha --compilers js:babel-register test/index.js"
}
}Last updated