1
0
mirror of synced 2024-11-21 20:46:07 +03:00

Automatically set up docs symlink

This also adds some docs about building the documentation.
[ci skip]
This commit is contained in:
Kevin Brown 2015-01-12 19:56:25 -05:00
parent 86b4a5d8e2
commit 766d9f05e0
3 changed files with 32 additions and 1 deletions

View File

@ -122,6 +122,19 @@ module.exports = function (grunt) {
}
},
symlink: {
docs: {
cwd: 'dist',
expand: true,
overwrite: false,
src: [
'*'
],
dest: 'docs/dist',
filter: 'isDirectory'
}
},
requirejs: {
'dist': {
options: {
@ -219,6 +232,7 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-qunit');
grunt.loadNpmTasks('grunt-contrib-requirejs');
grunt.loadNpmTasks('grunt-contrib-symlink');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
@ -232,7 +246,7 @@ module.exports = function (grunt) {
grunt.registerTask('minify', ['uglify', 'sass:dist']);
grunt.registerTask('test', ['qunit', 'jshint']);
grunt.registerTask('docs', ['jekyll:serve']);
grunt.registerTask('docs', ['symlink:docs', 'jekyll:serve']);
grunt.registerTask('docs-release', ['default', 'clean:docs', 'gh-pages']);
};

View File

@ -2,6 +2,9 @@ Select2 Documentation
=====================
This repository holds the latest documentation for [Select2][select2].
What is this?
-------------
The documentation is automatically extracted from the `docs` directory at the
[Select2 source repository][select2-source]. This is done periodically by
the maintainers of Select2.
@ -11,5 +14,18 @@ the source repository.** We _may_ accept pull requests if they match the
source `docs` directory, but for the most part pull requests will be closed on
sight.
How can I build these docs manually?
------------------------------------
In the [main Select2 repository][select2-source], you can build the
documentation by executing
```bash
grunt docs
```
Which will start up the documentation on port 4000. You will need
[Jekyll][jekyll] installed to build the documentation.
[jekyll]: http://jekyllrb.com/
[select2]: https://select2.github.io
[select2-source]: https://github.com/select2/select2

View File

@ -46,6 +46,7 @@
"grunt-contrib-nodeunit": "~0.3.3",
"grunt-contrib-qunit": "~0.4.0",
"grunt-contrib-requirejs": "^0.4.4",
"grunt-contrib-symlink": "^0.3.0",
"grunt-contrib-uglify": "~0.4.0",
"grunt-contrib-watch": "~0.6.0",
"grunt-gh-pages": "^0.9.1",