mirror of
https://github.com/mdbootstrap/mdb-ui-kit.git
synced 2024-11-27 03:54:13 +03:00
Updated with dev setup and release instructions
This commit is contained in:
parent
da4721fc3c
commit
88f29e3583
|
@ -198,23 +198,10 @@ includes code changes) and under the terms of the
|
||||||
- Use CDNs and HTTPS for third-party JS when possible. We don't use protocol-relative URLs in this case because they break when viewing the page locally via `file://`.
|
- Use CDNs and HTTPS for third-party JS when possible. We don't use protocol-relative URLs in this case because they break when viewing the page locally via `file://`.
|
||||||
- Use [WAI-ARIA](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) attributes in documentation examples to promote accessibility.
|
- Use [WAI-ARIA](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) attributes in documentation examples to promote accessibility.
|
||||||
|
|
||||||
### CSS
|
### Coding styles
|
||||||
|
|
||||||
[Adhere to the Code Guide.](http://codeguide.co/#css)
|
Before committing ensure your changes follow our coding standards by running `grunt dist docs`. This will run the various code style
|
||||||
|
check tools and provid feedback.
|
||||||
- When feasible, default color palettes should comply with [WCAG color contrast guidelines](http://www.w3.org/TR/WCAG20/#visual-audio-contrast).
|
|
||||||
- Except in rare cases, don't remove default `:focus` styles (via e.g. `outline: none;`) without providing alternative styles. See [this A11Y Project post](http://a11yproject.com/posts/never-remove-css-outlines/) for more details.
|
|
||||||
|
|
||||||
### JS
|
|
||||||
|
|
||||||
- No semicolons (in client-side JS)
|
|
||||||
- 2 spaces (no tabs)
|
|
||||||
- strict mode
|
|
||||||
- "Attractive"
|
|
||||||
|
|
||||||
### Checking coding style
|
|
||||||
|
|
||||||
Run `grunt build` before committing to ensure your changes follow our coding standards.
|
|
||||||
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
@ -222,48 +209,47 @@ Run `grunt build` before committing to ensure your changes follow our coding sta
|
||||||
By contributing your code, you agree to license your contribution under the [MIT License](LICENSE).
|
By contributing your code, you agree to license your contribution under the [MIT License](LICENSE).
|
||||||
By contributing to the documentation, you agree to license your contribution under the [Creative Commons Attribution 3.0 Unported License](docs/LICENSE).
|
By contributing to the documentation, you agree to license your contribution under the [Creative Commons Attribution 3.0 Unported License](docs/LICENSE).
|
||||||
|
|
||||||
## Building documentation
|
## Development setup
|
||||||
|
The development and testing with the documentation has been connected so we not only can utilize Material Design examples,
|
||||||
|
but all of the original Bootstrap documentation examples as well. The most productive environment so far is to have
|
||||||
|
Bootstrap checked out in parallel to this project, running three different terminal commands simultaneously:
|
||||||
|
|
||||||
1. Checkout the master branch from the project root directory
|
1. Bootstrap documentation
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ git checkout master
|
cd bootstrap
|
||||||
|
bundle install
|
||||||
|
npm install
|
||||||
|
|
||||||
|
# this is all you need after initial setup
|
||||||
|
jekyll serve
|
||||||
```
|
```
|
||||||
|
|
||||||
1. Bundle install (if not already done)
|
1. Initial build and watch
|
||||||
```bash
|
|
||||||
$ bundle install
|
|
||||||
```
|
|
||||||
|
|
||||||
1. Checkout the `gh-pages` branch in `_gh_pages` directory
|
This performs an initial build and watches both the core and docs sources for changes.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ git clone git@github.com:FezVrasta/bootstrap-material-design.git -b gh-pages _gh_pages
|
cd bootstrap-material-design
|
||||||
|
bundle install
|
||||||
|
npm install
|
||||||
|
|
||||||
|
# this is all you need after initial setup
|
||||||
|
grunt dist docs watch
|
||||||
```
|
```
|
||||||
|
|
||||||
**rosskevin only note** when ready kill all files and commit a clean gh-pages directory for a clean start.
|
1. Documentation
|
||||||
|
|
||||||
The `_gh_pages` directory is already in `.gitignore` so we are just fine.
|
(assuming the above is done)
|
||||||
|
|
||||||
1. Copy the latest code to the `docs/dist` (if not already done)
|
|
||||||
```bash
|
|
||||||
$ grunt docs
|
|
||||||
```
|
|
||||||
|
|
||||||
1. Let's test changes to the documentation:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ jekyll serve
|
jekyll serve
|
||||||
```
|
|
||||||
1. Browse to [http://127.0.0.1:9001/](http://127.0.0.1:9001/)
|
|
||||||
|
|
||||||
1. Make some changes to files in the `docs` directory and review them
|
## Releasing
|
||||||
|
|
||||||
1. Commit and push the newly generated site on github:
|
1. Make sure travis succeeds first
|
||||||
|
1. Update the version in `package.json`, it's version is used in the documentation
|
||||||
```bash
|
1. Build the distribution `grunt dist docs`
|
||||||
$ cd _gh_pages
|
1. Commit
|
||||||
$ git add .
|
1. Tag for bower - a valid tag starts with a `v` such as `v4.0.0`
|
||||||
$ git commit -m "First generation"
|
1. Push documentation with `grunt publish`
|
||||||
$ git push
|
|
||||||
```
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user