Skip to content

Commit

Permalink
Add grunt files to create gh-page branch
Browse files Browse the repository at this point in the history
  • Loading branch information
YorkshireKev committed Aug 6, 2015
1 parent ea8ddad commit 8f0a0d0
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
*~
gh-pages/
node_modules/
45 changes: 45 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
module.exports = function (grunt) {
grunt.initConfig({
'copy': {
dev: {
files: [{
expand: true,
src: './images/*',
dest: './gh-pages/'
}, {
src: './index.html',
dest: './gh-pages/index.html'
}, {
src: './css/style.css',
dest: './gh-pages/css/style.css'
}, {
src: './js/wheel.js',
dest: './gh-pages/js/wheel.js'
}, {
src: './js/stats.min.js',
dest: './gh-pages/js/stats.min.js'
}]
}
},

uglify: {
options: {
mangle: true,
report: "gzip"
},
my_target: {
files: [{
'gh-pages/js/orbit.js': ['js/orbit.js']
}, {
'gh-pages/js/three.js': ['js/three.js']
}, {
'gh-pages/js/slotmachine.js': ['js/slotmachine.js']
}]
}
}

});
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.registerTask('default', ['uglify', 'copy']);
};
7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"devDependencies": {
"grunt": "^0.4.5",
"grunt-contrib-copy": "^0.8.0",
"grunt-contrib-uglify": "^0.9.1"
}
}

0 comments on commit 8f0a0d0

Please sign in to comment.