summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2016-09-05 12:36:53 +0200
committerSamy Pessé <samypesse@gmail.com>2016-09-05 12:36:53 +0200
commit3f1ec310ca0c634e1f63a1e00e485ea93916e810 (patch)
treeab86593cbf407c61213c8dfa7fb1a5448836c507 /packages
parentb796069adeadd655ad34dc425ff7a05d7a54cd47 (diff)
downloadgitbook-3f1ec310ca0c634e1f63a1e00e485ea93916e810.zip
gitbook-3f1ec310ca0c634e1f63a1e00e485ea93916e810.tar.gz
gitbook-3f1ec310ca0c634e1f63a1e00e485ea93916e810.tar.bz2
Add compilation ES6 with babel for "gitbook"
Diffstat (limited to 'packages')
-rw-r--r--packages/gitbook/.babelrc3
-rw-r--r--packages/gitbook/.npmignore2
-rwxr-xr-xpackages/gitbook/bin/gitbook.js2
-rw-r--r--packages/gitbook/package.json11
4 files changed, 15 insertions, 3 deletions
diff --git a/packages/gitbook/.babelrc b/packages/gitbook/.babelrc
new file mode 100644
index 0000000..d4e5f8d
--- /dev/null
+++ b/packages/gitbook/.babelrc
@@ -0,0 +1,3 @@
+{
+ "presets": ["es2015", "react"]
+}
diff --git a/packages/gitbook/.npmignore b/packages/gitbook/.npmignore
new file mode 100644
index 0000000..e04684f
--- /dev/null
+++ b/packages/gitbook/.npmignore
@@ -0,0 +1,2 @@
+src
+!lib
diff --git a/packages/gitbook/bin/gitbook.js b/packages/gitbook/bin/gitbook.js
index 5cadbc9..0492d29 100755
--- a/packages/gitbook/bin/gitbook.js
+++ b/packages/gitbook/bin/gitbook.js
@@ -1,5 +1,5 @@
#! /usr/bin/env node
-/* eslint-disable no-console */
+/* eslint-disable no-console,no-var */
var color = require('bash-color');
diff --git a/packages/gitbook/package.json b/packages/gitbook/package.json
index 7b36ae5..27eda49 100644
--- a/packages/gitbook/package.json
+++ b/packages/gitbook/package.json
@@ -67,7 +67,9 @@
"urijs": "1.18.0"
},
"scripts": {
- "test": "./node_modules/.bin/mocha ./testing/setup.js \"./lib/**/*/__tests__/*.js\" --bail --reporter=list --timeout=10000"
+ "test": "./node_modules/.bin/mocha ./testing/setup.js \"./lib/**/*/__tests__/*.js\" --bail --reporter=list --timeout=10000",
+ "dist": "rm -rf lib/ && babel --presets es2015 -d lib/ src/",
+ "prepublish": "npm run dist"
},
"repository": {
"type": "git",
@@ -95,5 +97,10 @@
"name": "Samy Pessé",
"email": "samy@gitbook.com"
}
- ]
+ ],
+ "devDependencies": {
+ "babel-cli": "^6.14.0",
+ "babel-preset-es2015": "^6.14.0",
+ "babel-preset-react": "^6.11.1"
+ }
}