summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamy Pesse <samypesse@gmail.com>2016-09-28 10:03:38 +0200
committerSamy Pesse <samypesse@gmail.com>2016-09-28 10:03:38 +0200
commitc314281da07870a7650a95fc593b2137a8d16c2f (patch)
treef5f3588ff3b0ddedf2ddc9a016f7a24a1fabf114
parentbc5df83846a94fdbbfe7e1ca41489162e3a0dc47 (diff)
downloadgitbook-c314281da07870a7650a95fc593b2137a8d16c2f.zip
gitbook-c314281da07870a7650a95fc593b2137a8d16c2f.tar.gz
gitbook-c314281da07870a7650a95fc593b2137a8d16c2f.tar.bz2
Add CONTRIBUTING.md
-rw-r--r--CONTRIBUTING.md51
-rw-r--r--packages/gitbook-core/.npmignore2
-rw-r--r--packages/gitbook-core/package.json2
-rw-r--r--packages/gitbook-plugin-sharing/index.js7
-rw-r--r--packages/gitbook-plugin-theme-default/.gitignore2
-rw-r--r--packages/gitbook-plugin-theme-default/.npmignore2
-rw-r--r--packages/gitbook-plugin-theme-default/assets/.gitkeep0
-rw-r--r--packages/gitbook-plugin-theme-default/package.json7
-rw-r--r--packages/gitbook/src/output/website/copyPluginAssets.js2
9 files changed, 60 insertions, 15 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000..d8c3fb0
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,51 @@
+
+# Contributing
+
+Want to contribute to GitBook? That would be awesome!
+
+- [Send feedback](#send-feedback)
+- [Reporting Bugs](#reporting-bugs)
+- [Asking Questions](#asking-questions)
+- [Submitting Pull Requests](#submitting-pull-requests)
+- [Running Tests](#running-tests)
+
+## Send feedback
+
+We’ve done our best to test but your feedback is really important. If you encounter problems or have feedback about GitBook products (GitBook.com, GitBook Editor, or the Toolchain), please log an issue in the [GitbookIO/feedback](https://github.com/GitbookIO/feedback/issues) repository.
+
+
+## Reporting Bugs
+
+If you run into any weird behavior while using GitBook, feel free to open a new issue in this repository! To be most helpful, please include the steps to reproduce the bug as best you can, including the output of command `gitbook -V`.
+
+## Asking Questions
+
+Questions are very welcome :smile:! Previous questions that folks have asked are tagged with a [`question`](https://github.com/GitBookIO/gitbook/issues?q=is%3Aissue+is%3Aclosed+label%3Aquestion) label, so before opening a new issue double-check that someone hasn't asked it before. But if you don't see anything, or if you're not sure if it's the same, err on the side of asking!
+
+We've also got a [GitBook Community Slack](https://slack.gitbook.com/) where you can ask questions and get answers from other people using GitBook.
+
+## Submitting Pull Requests
+
+All pull requests are super welcomed and greatly appreciated! Easy issues are marked with an [`easy-one`](https://github.com/GitBookIO/gitbook/issues?q=is%3Aopen+is%3Aissue+label%3Aeasy-one) label if you're looking for a simple place to get familiar with the code base.
+
+Please include tests and docs with every pull request!
+
+## Running Tests
+
+To run the examples, you need to have the GitBook repository cloned to your computer. After that, you need to `cd` into the directory where you cloned it, and install the dependencies from `npm`.
+
+```
+npm install
+```
+
+Then you'll need to bootstrap it:
+
+```
+npm run bootstrap
+```
+
+Which will also compile the source files. Then run the tests with:
+
+```
+npm test
+```
diff --git a/packages/gitbook-core/.npmignore b/packages/gitbook-core/.npmignore
index 5862c13..b9cde8e 100644
--- a/packages/gitbook-core/.npmignore
+++ b/packages/gitbook-core/.npmignore
@@ -1,3 +1,3 @@
src
!lib
-!gitbook.core.min.js
+!dist
diff --git a/packages/gitbook-core/package.json b/packages/gitbook-core/package.json
index c00c6cc..4d5a40a 100644
--- a/packages/gitbook-core/package.json
+++ b/packages/gitbook-core/package.json
@@ -27,7 +27,7 @@
},
"scripts": {
"dist-lib": "rm -rf lib/ && babel -d lib/ src/",
- "dist-standalone": "browserify -r ./lib/index.js:gitbook-core -r react -r react-dom ./lib/index.js | uglifyjs -c > gitbook.core.min.js",
+ "dist-standalone": "browserify -r ./lib/index.js:gitbook-core -r react -r react-dom ./lib/index.js | uglifyjs -c > ./dist/gitbook.core.min.js",
"dist": "npm run dist-lib && npm run dist-standalone",
"prepublish": "npm run dist"
},
diff --git a/packages/gitbook-plugin-sharing/index.js b/packages/gitbook-plugin-sharing/index.js
index 5217cad..5803889 100644
--- a/packages/gitbook-plugin-sharing/index.js
+++ b/packages/gitbook-plugin-sharing/index.js
@@ -1,9 +1,4 @@
module.exports = {
- website: {
- assets: './assets',
- plugins: [
- './src/index.js'
- ]
- }
+
};
diff --git a/packages/gitbook-plugin-theme-default/.gitignore b/packages/gitbook-plugin-theme-default/.gitignore
index d352d3c..dfd90dc 100644
--- a/packages/gitbook-plugin-theme-default/.gitignore
+++ b/packages/gitbook-plugin-theme-default/.gitignore
@@ -1 +1 @@
-assets/theme.js
+_assets
diff --git a/packages/gitbook-plugin-theme-default/.npmignore b/packages/gitbook-plugin-theme-default/.npmignore
index 6838c3e..75e0923 100644
--- a/packages/gitbook-plugin-theme-default/.npmignore
+++ b/packages/gitbook-plugin-theme-default/.npmignore
@@ -1 +1 @@
-!assets/theme.js
+!_assets
diff --git a/packages/gitbook-plugin-theme-default/assets/.gitkeep b/packages/gitbook-plugin-theme-default/assets/.gitkeep
deleted file mode 100644
index e69de29..0000000
--- a/packages/gitbook-plugin-theme-default/assets/.gitkeep
+++ /dev/null
diff --git a/packages/gitbook-plugin-theme-default/package.json b/packages/gitbook-plugin-theme-default/package.json
index 349bace..6beaaed 100644
--- a/packages/gitbook-plugin-theme-default/package.json
+++ b/packages/gitbook-plugin-theme-default/package.json
@@ -2,14 +2,13 @@
"name": "gitbook-plugin-theme-default",
"description": "Default theme for GitBook",
"main": "./index.js",
- "browser": "./assets/theme.js",
+ "browser": "./_assets/theme.js",
"version": "1.0.5",
"engines": {
"gitbook": ">=3.0.0"
},
"dependencies": {
- "gitbook-core": "^0.0.0",
- "react": "^15.3.1"
+ "gitbook-core": "^0.0.0"
},
"devDependencies": {
"classnames": "^2.2.5",
@@ -22,7 +21,7 @@
},
"scripts": {
"build-css": "lessc -clean-css ./less/main.less ./_assets/website/theme.css",
- "build-js": "gitbook-plugin build ./src/index.js ./assets/theme.js",
+ "build-js": "gitbook-plugin build ./src/index.js ./_assets/theme.js",
"prepublish": "npm run build-css && npm run build-js"
},
"repository": {
diff --git a/packages/gitbook/src/output/website/copyPluginAssets.js b/packages/gitbook/src/output/website/copyPluginAssets.js
index 1291a06..bf5f488 100644
--- a/packages/gitbook/src/output/website/copyPluginAssets.js
+++ b/packages/gitbook/src/output/website/copyPluginAssets.js
@@ -105,7 +105,7 @@ function copyCoreJS(output) {
const options = output.getOptions();
const outputRoot = options.get('root');
- const inputFile = require.resolve('gitbook-core/gitbook.core.min.js');
+ const inputFile = require.resolve('gitbook-core/dist/gitbook.core.min.js');
const outputFile = path.join(outputRoot, 'gitbook/core.js');
logger.debug.ln('copy JS for gitbook-core');