1
0
mirror of synced 2024-11-28 15:46:03 +03:00

Set up the GitHub Pages command

Now we can synchronize GitHub Pages with the docs in the master
branch quickly and easily.
This commit is contained in:
Kevin Brown 2014-11-25 08:36:01 -05:00
parent d9e254ed27
commit 12de3c2b5e
2 changed files with 20 additions and 1 deletions

View File

@ -32,6 +32,10 @@ module.exports = function (grunt) {
} }
grunt.initConfig({ grunt.initConfig({
clean: {
docs: ['docs/_site']
},
uglify: { uglify: {
'dist': { 'dist': {
src: 'dist/js/select2.js', src: 'dist/js/select2.js',
@ -49,6 +53,17 @@ module.exports = function (grunt) {
] ]
}, },
'gh-pages': {
options: {
base: 'docs',
clone: 'node_modules/grunt-gh-pages/repo',
message: 'Updated docs with master',
push: false,
repo: 'git@github.com:kevin-brown/select2.git'
},
src: '**'
},
jekyll: { jekyll: {
options: { options: {
src: 'docs', src: 'docs',
@ -192,6 +207,7 @@ module.exports = function (grunt) {
} }
}); });
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-concat'); grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-qunit'); grunt.loadNpmTasks('grunt-contrib-qunit');
@ -199,6 +215,7 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-gh-pages');
grunt.loadNpmTasks('grunt-jekyll'); grunt.loadNpmTasks('grunt-jekyll');
grunt.loadNpmTasks('grunt-sass'); grunt.loadNpmTasks('grunt-sass');
@ -210,5 +227,5 @@ module.exports = function (grunt) {
grunt.registerTask('docs', ['jekyll:serve']); grunt.registerTask('docs', ['jekyll:serve']);
grunt.registerTask('release', ['default', 'jekyll:build']); grunt.registerTask('release', ['default', 'clean:docs', 'gh-pages']);
}; };

View File

@ -33,6 +33,7 @@
"devDependencies": { "devDependencies": {
"grunt": "^0.4.5", "grunt": "^0.4.5",
"grunt-cli": "^0.1.13", "grunt-cli": "^0.1.13",
"grunt-contrib-clean": "^0.6.0",
"grunt-contrib-concat": "^0.4.0", "grunt-contrib-concat": "^0.4.0",
"grunt-contrib-jshint": "^0.10.0", "grunt-contrib-jshint": "^0.10.0",
"grunt-contrib-nodeunit": "~0.3.3", "grunt-contrib-nodeunit": "~0.3.3",
@ -40,6 +41,7 @@
"grunt-contrib-requirejs": "^0.4.4", "grunt-contrib-requirejs": "^0.4.4",
"grunt-contrib-uglify": "~0.4.0", "grunt-contrib-uglify": "~0.4.0",
"grunt-contrib-watch": "~0.6.0", "grunt-contrib-watch": "~0.6.0",
"grunt-gh-pages": "^0.9.1",
"grunt-sass": "~0.12.0", "grunt-sass": "~0.12.0",
"node-sass": "~0.8.6" "node-sass": "~0.8.6"
} }