Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Babel package doc #990

Merged
merged 6 commits into from
Nov 22, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "_includes/babel"]
Copy link
Member

@hzoo hzoo Nov 22, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We'll need to add some instructions to the readme or add that automatically in make serve/npm start?

git submodule init
git submodule update

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally I would use : git clone --recursive [repo.git]

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whatever makes sense and so the user can just run npm start/make serve

Copy link
Member Author

@xtuc xtuc Nov 22, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The user won't even notice the change : https://github.com/xtuc/babel.github.io/blob/66f5f362840aa251ff3ea1bbfbf1eacef217cd1b/Makefile#L18. make serve is called from the start npm script.

path = _includes/babel
url = https://github.com/babel/babel.git
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,7 @@ serve:
exit 1; \
fi

git submodule init
git submodule update
bundle check || bundle install; \
bundle exec jekyll serve
1 change: 1 addition & 0 deletions _includes/babel
Submodule babel added at 3a27f4
12 changes: 12 additions & 0 deletions _includes/package_readme.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{% capture readme %}
{% include babel/packages/{{ page.package }}/README.md %}
{% endcapture %}

{{ readme
| newline_to_br
| split: "<br />"
| shift | shift | shift | shift
| join: "<br />"
| strip_html
| markdownify
}}
16 changes: 1 addition & 15 deletions docs/plugins/preset-stage-0.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,4 @@ And all plugins from presets:
- [preset-stage-2](/docs/plugins/preset-stage-2/)
- [preset-stage-3](/docs/plugins/preset-stage-3/)

## Installation

```sh
$ npm install --save-dev babel-preset-stage-0
```

## Usage

Add the following line to your `.babelrc` file:

```json
{
"presets": ["stage-0"]
}
```
{% include package_readme.html %}