added gh-pages build instructions, setup icons

This commit is contained in:
Kevin Ross 2015-11-20 15:17:08 -06:00
parent a73958ce48
commit 23cf7c6057
6 changed files with 87 additions and 3 deletions

1
.gitignore vendored
View File

@ -7,6 +7,7 @@
_gh_pages _gh_pages
_site _site
docs/.jekyll-metadata docs/.jekyll-metadata
docs/dist
*.log *.log
.sass-cache .sass-cache

View File

@ -217,3 +217,37 @@ 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
1. Checkout the master branch from the project root directory
```bash
$ git checkout master
```
2. Checkout the `gh-pages` branch in `_gh_pages` directory
```bash
$ git clone git@github.com:FezVrasta/bootstrap-material-design.git -b gh-pages _gh_pages
```
**rosskevin only note** when ready kill all files and commit a clean gh-pages directory for a clean start.
The `_gh_pages` directory is already in `.gitignore` so we are just fine.
3. Let's test changes to the documentation:
```bash
$ jekyll serve
```
4. Browse to [http://127.0.0.1:9001/](http://127.0.0.1:9001/)
5. Push the newly generated site on github:
```bash
$ cd _gh_pages
$ git add .
$ git commit -m "First generation"
$ git push
```

View File

@ -15,6 +15,7 @@ module.exports = function (grunt) {
grunt.initConfig({ grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jqueryCheck: configBridge.config.jqueryCheck.join('\n'), jqueryCheck: configBridge.config.jqueryCheck.join('\n'),
jqueryVersionCheck: configBridge.config.jqueryVersionCheck.join('\n'), jqueryVersionCheck: configBridge.config.jqueryVersionCheck.join('\n'),
@ -37,6 +38,26 @@ module.exports = function (grunt) {
} }
}, },
htmlmin: {
dist: {
options: {
collapseWhitespace: true,
conservativeCollapse: true,
minifyCSS: true,
minifyJS: true,
removeAttributeQuotes: true,
removeComments: true
},
expand: true,
cwd: '_gh_pages',
dest: '_gh_pages',
src: [
'**/*.html',
'!examples/**/*.html'
]
}
},
htmllint: { htmllint: {
//options: { //options: {
// stoponerror: false, // stoponerror: false,
@ -496,6 +517,26 @@ module.exports = function (grunt) {
] ]
} }
}, },
compress: {
main: {
options: {
archive: 'bootstrap-material-design-<%= pkg.version %>-dist.zip',
mode: 'zip',
level: 9,
pretty: true
},
files: [
{
expand: true,
cwd: 'dist/',
src: ['**'],
dest: 'bootstrap-material-design-<%= pkg.version %>-dist'
}
]
}
},
exec: { exec: {
"meteor-init": { "meteor-init": {
command: [ command: [
@ -624,5 +665,5 @@ module.exports = function (grunt) {
'docs-css', 'lint-docs-css', 'docs-js', 'lint-docs-js', 'clean:docs', 'copy:docs', 'build-icons-data' 'docs-css', 'lint-docs-css', 'docs-js', 'lint-docs-js', 'clean:docs', 'copy:docs', 'build-icons-data'
]); ]);
grunt.registerTask('prep-release', ['dist', 'docs', 'jekyll:github', 'htmlmin', 'compress']); grunt.registerTask('prep-release', ['dist', 'docs', 'jekyll:github', 'htmlmin']); //, 'compress']);
}; };

View File

@ -1,3 +1,9 @@
baseurl: "/bootstrap-material-design"
url: "http://fezvrasta.github.io"
include:
- .nojekyll
# Dependencies # Dependencies
markdown: kramdown markdown: kramdown
highlighter: rouge highlighter: rouge
@ -34,3 +40,5 @@ download:
# css_theme_hash: "sha384-aUGj/X2zp5rLCbBxumKTCw2Z50WgIr1vs/PFN4praOTvYXWlVyh2UtNUU0KAUhAX" # css_theme_hash: "sha384-aUGj/X2zp5rLCbBxumKTCw2Z50WgIr1vs/PFN4praOTvYXWlVyh2UtNUU0KAUhAX"
# js: https://maxcdn.bootstrapcdn.com/bootstrap/0.4.1/js/bootstrap.min.js # js: https://maxcdn.bootstrapcdn.com/bootstrap/0.4.1/js/bootstrap.min.js
# js_hash: "sha512-K1qjQ+NcF2TYO/eI3M6v8EiNYZfA95pQumfvcVrTHtwQVDG+aHRqLi/ETn2uB+1JqwYqVG3LIvdm9lj6imS/pQ==" # js_hash: "sha512-K1qjQ+NcF2TYO/eI3M6v8EiNYZfA95pQumfvcVrTHtwQVDG+aHRqLi/ETn2uB+1JqwYqVG3LIvdm9lj6imS/pQ=="

View File

@ -2,7 +2,7 @@
<h1 id="icons" class="page-header">Icons</h1> <h1 id="icons" class="page-header">Icons</h1>
<h2 id="icons-glyphs">Available icons</h2> <h2 id="icons-glyphs">Available icons</h2>
<p>Includes {{ site.data.icons.length }} in font format.</p> <p>Includes {{ site.data.icons.size }} icons in font format.</p>
<div class="bmd-icons"> <div class="bmd-icons">
<ul class="bmd-icons-list"> <ul class="bmd-icons-list">
{% for iconClassName in site.data.icons %} {% for iconClassName in site.data.icons %}

View File

@ -34,6 +34,7 @@
"grunt": "^0.4.5", "grunt": "^0.4.5",
"grunt-autoprefixer": "~3.0.3", "grunt-autoprefixer": "~3.0.3",
"grunt-contrib-clean": "~0.6.0", "grunt-contrib-clean": "~0.6.0",
"grunt-contrib-compress": "~0.14.0",
"grunt-contrib-concat": "~0.5.1", "grunt-contrib-concat": "~0.5.1",
"grunt-contrib-connect": "~0.11.2", "grunt-contrib-connect": "~0.11.2",
"grunt-contrib-copy": "~0.8.0", "grunt-contrib-copy": "~0.8.0",
@ -59,7 +60,6 @@
"spacejam": "^1.1.1" "spacejam": "^1.1.1"
}, },
"_bootstraps_dependencies_we_dont_use_yet": { "_bootstraps_dependencies_we_dont_use_yet": {
"grunt-contrib-compress": "~0.14.0",
"grunt-contrib-jade": "~0.15.0", "grunt-contrib-jade": "~0.15.0",
"grunt-csscomb": "~3.1.0", "grunt-csscomb": "~3.1.0",
"grunt-saucelabs": "~8.6.1", "grunt-saucelabs": "~8.6.1",