Skip to content

Commit

Permalink
Turn on GitHub pages, recompile docs when needed (#122)
Browse files Browse the repository at this point in the history
* gh-pages sync script

* no relative protocol

* sync then go back to master

* better docs synchronization

* Add only docs distribution folder

* Updated documentation.

* Move things around

* Move docs to root because GitHub

* better comparison with gitignore

* some lint fixes after fixing the lint script

* removing lint rules from src-docs/ for now

* not now
  • Loading branch information
bevacqua authored Nov 8, 2017
1 parent cba8218 commit 9fb5a41
Show file tree
Hide file tree
Showing 207 changed files with 166,777 additions and 231 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
node_modules/
docs/dist/

reports/
tmp/
dist/
Expand Down
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
node_modules/
docs/dist/
docs/
reports/
tmp/

Expand Down
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ There are four steps to creating a new component:
1. Create the SCSS for the component in `src/components`.
2. Create the React portion of the component.
3. Write tests.
4. Document it with examples in `docs`.
4. Document it with examples in `src-docs`.

You can do this using Yeoman (the easy way), or you can do it manually (the hard way).

Expand Down Expand Up @@ -74,9 +74,9 @@ that expects a new route. A `Page Demo` will create a file you can include withi
created document page. Usually you'll create a Page first, then follow it up with more demos.

The script will ask you for a name of the component you'd like to document,
then create some files in `/docs/src/views/`. If the name you provide isn't the exact name of a component,
then create some files in `src-docs/src/views/`. If the name you provide isn't the exact name of a component,
you might need to adjust the import in the generated files. Otherwise simply add the document to the
`/docs/src/services/routes/routes.js` file to make it available in the navigation / browser.
`src-docs/src/services/routes/routes.js` file to make it available in the navigation / browser.

### Manually

Expand Down Expand Up @@ -112,11 +112,11 @@ To see how well the components have been covered by tests, you can run

#### Document the component with examples

1. Create a directory for your example in `docs/src/views`. Name it the name of the
1. Create a directory for your example in `src-docs/src/views`. Name it the name of the
component.
2. Create a `{component name}_example.js` file inside the directory. You'll use this file to define
the different examples for your component.
3. Add the route to this file in `docs/src/services/routes/routes.js`.
3. Add the route to this file in `src-docs/src/services/routes/routes.js`.
4. In the `{component name}_example.js` file you created, define examples which demonstrate the component and describe
its role from a UI perspective.

Expand Down
2 changes: 1 addition & 1 deletion FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ Many of our products themselves are open source and rely upon this library to fu

Bug reports are most welcome, but we're not considering external feature requests at this time.

[docs]: https://eui.now.sh
[docs]: https://elastic.github.io/eui/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ You can find documentation around creating and submitting new components in [CON

[license]: LICENSE.md
[faq]: FAQ.md
[docs]: https://eui.now.sh
[docs]: https://elastic.github.io/eui/
[ci-badge]: https://travis-ci.org/elastic/eui.svg?branch=master
[ci-site]: https://travis-ci.org/elastic/eui
Loading

0 comments on commit 9fb5a41

Please sign in to comment.