mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-05-24 22:55:50 +00:00
add hash to build files & correct minor fix
This commit is contained in:
parent
9cc92ccb25
commit
f71590449c
2 changed files with 20 additions and 3 deletions
22
Gruntfile.js
22
Gruntfile.js
|
|
@ -5,7 +5,7 @@ module.exports = function(grunt) {
|
|||
grunt.initConfig({
|
||||
|
||||
clean: {
|
||||
build: ['public/build']
|
||||
build: ['build']
|
||||
},
|
||||
|
||||
uglify: {
|
||||
|
|
@ -108,6 +108,21 @@ module.exports = function(grunt) {
|
|||
}
|
||||
},
|
||||
|
||||
// UPDATE IT!
|
||||
hashres: {
|
||||
build: {
|
||||
options: {
|
||||
fileNameFormat: '${name}-${hash}.${ext}'
|
||||
},
|
||||
src: [
|
||||
'build/*.js', 'build/*.css',
|
||||
'build/bower_components/bootstrap/docs/assets/css/*.css',
|
||||
'build/bower_components/habitrpg-shared/dist/*.css'
|
||||
],
|
||||
dest: 'make-sure-i-do-not-exist'
|
||||
}
|
||||
},
|
||||
|
||||
nodemon: {
|
||||
dev: {
|
||||
ignoredFiles: ['public/*', 'Gruntfile.js', 'views/*', 'build/*'] // Do not work!
|
||||
|
|
@ -134,8 +149,8 @@ module.exports = function(grunt) {
|
|||
});
|
||||
|
||||
// Register tasks.
|
||||
grunt.registerTask('build:prod', ['clean:build', 'uglify', 'stylus', 'cssmin']);
|
||||
grunt.registerTask('build:dev', ['clean:build', 'stylus', 'cssmin']);
|
||||
grunt.registerTask('build:prod', ['clean:build', 'uglify', 'stylus', 'cssmin', 'hashres']);
|
||||
grunt.registerTask('build:dev', ['clean:build', 'stylus', 'cssmin', 'hashres']);
|
||||
|
||||
grunt.registerTask('run:dev', [ 'build:dev', 'concurrent' ]);
|
||||
|
||||
|
|
@ -147,5 +162,6 @@ module.exports = function(grunt) {
|
|||
grunt.loadNpmTasks('grunt-nodemon');
|
||||
grunt.loadNpmTasks('grunt-concurrent');
|
||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||
grunt.loadNpmTasks('grunt-hashres');
|
||||
|
||||
};
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
"grunt-contrib-clean": "~0.5.0",
|
||||
"grunt-contrib-cssmin": "~0.6.1",
|
||||
"grunt-contrib-watch": "~0.5.x",
|
||||
"grunt-hashres": "~0.3.2",
|
||||
"grunt-nodemon": "~0.1.1",
|
||||
"grunt-concurrent": "~0.3.1",
|
||||
"bower": "~1.2.4",
|
||||
|
|
|
|||
Loading…
Reference in a new issue