mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-23 19:06:31 +00:00
Add CONTRIBUTING.md
This commit is contained in:
@@ -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
|
||||
```
|
||||
@@ -1,3 +1,3 @@
|
||||
src
|
||||
!lib
|
||||
!gitbook.core.min.js
|
||||
!dist
|
||||
|
||||
@@ -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"
|
||||
},
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
|
||||
module.exports = {
|
||||
website: {
|
||||
assets: './assets',
|
||||
plugins: [
|
||||
'./src/index.js'
|
||||
]
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -1 +1 @@
|
||||
assets/theme.js
|
||||
_assets
|
||||
|
||||
@@ -1 +1 @@
|
||||
!assets/theme.js
|
||||
!_assets
|
||||
|
||||
@@ -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": {
|
||||
|
||||
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user