Commit e4500886 authored by Vadim Makeev's avatar Vadim Makeev

Experimental publish task for gh-pages

parent 69c99d74
...@@ -9,9 +9,86 @@ module.exports = function(grunt) { ...@@ -9,9 +9,86 @@ module.exports = function(grunt) {
commitFiles: ['package.json', 'bower.json'], commitFiles: ['package.json', 'bower.json'],
pushTo: 'origin' pushTo: 'origin'
} }
},
copy: {
prepare: {
files: [{
src: [
'**',
'!node_modules/**',
'!bower_components/**',
'!Contributing.md',
'!Gruntfile.js',
'!License.md',
'!Readme.md',
'!bower.json',
'!package.json'
],
dest: 'temp/'
},{
expand: true,
cwd: 'node_modules/shower-core/',
src: [
'**',
'!package.json',
'!Readme.md'
],
dest: 'temp/shower/'
},{
expand: true,
cwd: 'node_modules/shower-ribbon/',
src: [
'**',
'!package.json',
'!Readme.md'
],
dest: 'temp/shower/themes/ribbon/'
},{
expand: true,
cwd: 'node_modules/shower-bright/',
src: [
'**',
'!package.json',
'!Readme.md'
],
dest: 'temp/shower/themes/bright/'
}]
} }
},
replace: {
core: {
src: 'temp/index.html',
overwrite: true,
replacements: [{
from: /(node_modules|bower_components)\/shower-core/g,
to: 'shower'
},{
from: /(node_modules|bower_components)\/shower-(ribbon|bright)/g,
to: 'shower/themes/$2'
}]
},
themes: {
src: 'temp/shower/themes/*/index.html',
overwrite: true,
replacements: [{
from: '../shower-core', to: '../..'
}]
}
},
'gh-pages': {
options: {
base: 'temp'
},
src: ['**']
},
clean: ['temp']
}); });
grunt.registerTask('default', ['bump']); grunt.registerTask('publish', [
'copy',
'replace',
'gh-pages',
'clean'
]);
}; };
\ No newline at end of file
...@@ -33,6 +33,10 @@ ...@@ -33,6 +33,10 @@
"devDependencies": { "devDependencies": {
"grunt": "^0.4.4", "grunt": "^0.4.4",
"grunt-bump": "0.0.13", "grunt-bump": "0.0.13",
"grunt-contrib-clean": "^0.5.0",
"grunt-contrib-copy": "^0.5.0",
"grunt-gh-pages": "^0.9.1",
"grunt-text-replace": "^0.3.11",
"load-grunt-tasks": "^0.4.0" "load-grunt-tasks": "^0.4.0"
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment