summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamy Pesse <samypesse@gmail.com>2016-10-11 10:19:48 +0200
committerSamy Pesse <samypesse@gmail.com>2016-10-11 10:19:48 +0200
commit3a2abb870b2c18e13c8474d33eb3c61653a09663 (patch)
treeabc82909edc4f6d92cae2dc6bd644e18006b36a7
parente8947a2c11761785db194142f9a4fd107fe152ae (diff)
downloadgitbook-3a2abb870b2c18e13c8474d33eb3c61653a09663.zip
gitbook-3a2abb870b2c18e13c8474d33eb3c61653a09663.tar.gz
gitbook-3a2abb870b2c18e13c8474d33eb3c61653a09663.tar.bz2
gitbook-plugin create should add eslint config
-rw-r--r--packages/gitbook-core/package.json2
-rw-r--r--packages/gitbook-plugin/src/create.js8
-rw-r--r--packages/gitbook-plugin/template/.eslintrc3
3 files changed, 9 insertions, 4 deletions
diff --git a/packages/gitbook-core/package.json b/packages/gitbook-core/package.json
index 09fa65f..8e25548 100644
--- a/packages/gitbook-core/package.json
+++ b/packages/gitbook-core/package.json
@@ -46,4 +46,4 @@
"bugs": {
"url": "https://github.com/GitbookIO/gitbook/issues"
}
-}
+} \ No newline at end of file
diff --git a/packages/gitbook-plugin/src/create.js b/packages/gitbook-plugin/src/create.js
index cdfc112..756e0dd 100644
--- a/packages/gitbook-plugin/src/create.js
+++ b/packages/gitbook-plugin/src/create.js
@@ -1,5 +1,6 @@
const fs = require('fs-extra');
const path = require('path');
+const GITBOOK_VERSION = require('../package.json').version;
const TEMPLATE_DIR = path.resolve(__dirname, '../template');
@@ -17,13 +18,14 @@ function create(outputDir, spec) {
'browser': './_assets/plugin.js',
'version': '0.0.0',
'dependencies': {
- 'gitbook-core': '^0.0.0'
+ 'gitbook-core': '^' + GITBOOK_VERSION
},
'devDependencies': {
- 'gitbook-plugin': '*'
+ 'gitbook-plugin': '^' + GITBOOK_VERSION,
+ 'eslint-config-gitbook': '1.4.0'
},
'engines': {
- 'gitbook': '>=3.0.0'
+ 'gitbook': '>=4.0.0-alpha.0'
},
'scripts': {
'build-js': 'gitbook-plugin build ./src/index.js ./_assets/plugin.js',
diff --git a/packages/gitbook-plugin/template/.eslintrc b/packages/gitbook-plugin/template/.eslintrc
new file mode 100644
index 0000000..90359b2
--- /dev/null
+++ b/packages/gitbook-plugin/template/.eslintrc
@@ -0,0 +1,3 @@
+{
+ "extends": "gitbook/plugin"
+}