Skip to content

Commit

Permalink
Inline docs (#2602)
Browse files Browse the repository at this point in the history
* Add English docs to repo

* Update PR template to mention documentation requirement

* Add guide markdown linting
  • Loading branch information
lukastaegert committed Dec 20, 2018
1 parent aa8ecb6 commit 4accf36
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 192 deletions.
36 changes: 25 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,36 @@
# Rollupjs.org

This is the source code for the website!
This is the source code for the website. Note that the actual guide is now part of the [main rollup repo](https://github.com/rollup/rollup/tree/master/guide) and needs to be updated there, see below.

## Steps to build the website locally

1. `npm install`
2. `npm run dev`
3. Open up http://localhost:3000


## Adding translations

Translations into other languages are warmly welcomed. Make a copy of the `guide/en` directory, renaming it to your language (e.g. `guide/fr`), and update the markdown files inside. Once done, the translation will be available at `/[lang]`.
2. `npm run update-guide`
3. `npm run dev`
4. Open up http://localhost:3000

## Updating the guide contents

The guide is part of the main rollup repo, which again is added to this repo in form of a submodule. Running `npm run update-guide` should automatically initialize the submodule and copy the latest guide into a local folder. To update the guide contents:

1. Update the guide in a fork or a branch (if you have access rights) of the main rollup repo and make a pull request. Pull requests that add or modify features should always update the guide as well.
2. Once it is merged, check out the latest master branch in the submodule:
```bash
cd rollup-submodule
git checkout master
git pull
```
3. Commit the new branch in the main repo:
```bash
cd ..
git add rollup-submodule
git commit -m "Update guide"
```

Steps 2 and 3 should be done by the person merging the pull request in the main rollup repo. Once the commit has been pushed to `origin/master`, the website should be updated by the CI automatically. If necessary instead of checking out latest master, it is also possible to check out any other commit to e.g. test a pull request.

## Style Guidelines

_(Note: This section will be updated on an as-needed basis)_

- Please use `-` for bulleted list items.
- Please set a preferred line length of 100 characters in your editor for Markdown files in this repository.
- Please do not use hard line breaks to format blocks of plain text. Rather, please enable soft-line breaks in your editor.
- Please do not use hard line breaks to format blocks of plain text. Rather, please enable soft-line breaks in your editor.
4 changes: 0 additions & 4 deletions markdownlint.json

This file was deleted.

171 changes: 0 additions & 171 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 3 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,12 @@
"scripts": {
"dev": "sapper dev",
"build": "sapper export --legacy",
"test": "npm run lint",
"start": "sirv export",
"lint": "markdownlint --config markdownlint.json guide/en/**/*.md",
"update-guide": "git submodule update --init --recursive && shx rm -rf guide/en && shx cp -r rollup-submodule/guide/. guide/en",
"update-guide": "git submodule update --init --recursive && shx rm -rf guide/en && shx cp -r rollup-submodule/docs/ guide/en",
"clean": "rm -rf client/dist && rm -rf server/dist && rm -rf service-worker/dist && mkdir -p client/dist && mkdir -p server/dist && mkdir -p service-worker/dist",
"stage": "(cd export && now .)",
"predeploy": "npm run update-guide && npm test && npm run build",
"predeploy:ci": "npm run update-guide && npm test && npm test && npm run build",
"predeploy": "npm run update-guide && npm run build",
"predeploy:ci": "npm run update-guide && npm run build",
"deploy": "(cd export && now . && now alias)",
"deploy:ci": "(cd export && now . --token $NOW_TOKEN && now alias --token $NOW_TOKEN)"
},
Expand Down

0 comments on commit 4accf36

Please sign in to comment.