Clean grunt file
This commit is contained in:
parent
4634cfb353
commit
9d64078659
2 changed files with 1 additions and 126 deletions
116
Gruntfile.js
116
Gruntfile.js
|
@ -3,7 +3,6 @@
|
|||
module.exports = function (grunt) {
|
||||
var paths = {
|
||||
dist: 'dist',
|
||||
tmp: '.tmp',
|
||||
jade: 'views/**/**/*.jade',
|
||||
css: 'public/stylesheets/*.css',
|
||||
vendor: 'public/stylesheets/vendor',
|
||||
|
@ -31,10 +30,6 @@ module.exports = function (grunt) {
|
|||
browserifyOptions: { 'debug': true },
|
||||
watch: true
|
||||
}
|
||||
},
|
||||
dist: {
|
||||
src: [ paths.js ],
|
||||
dest: paths.browserified
|
||||
}
|
||||
},
|
||||
copy: {
|
||||
|
@ -53,25 +48,8 @@ module.exports = function (grunt) {
|
|||
paths.browserified
|
||||
]
|
||||
}]
|
||||
},
|
||||
dist: {
|
||||
files: [{
|
||||
dot: true,
|
||||
src: [
|
||||
paths.tmp,
|
||||
paths.browserified,
|
||||
'<%= paths.dist %>/*',
|
||||
'!<%= paths.dist %>/.git*'
|
||||
]
|
||||
}]
|
||||
}
|
||||
},
|
||||
csslint: {
|
||||
options: {
|
||||
csslintrc: '.csslintrc'
|
||||
},
|
||||
src: paths.css
|
||||
},
|
||||
express: {
|
||||
dev: {
|
||||
options: {
|
||||
|
@ -82,95 +60,6 @@ module.exports = function (grunt) {
|
|||
debug: true,
|
||||
background: true
|
||||
}
|
||||
},
|
||||
test: {
|
||||
options: {
|
||||
script: paths.server,
|
||||
harmony: true,
|
||||
port: 9000,
|
||||
node_env: 'test',
|
||||
background: true,
|
||||
debug: false
|
||||
}
|
||||
},
|
||||
prod: {
|
||||
options: {
|
||||
script: paths.server,
|
||||
harmony: true,
|
||||
port: 9000,
|
||||
node_env: 'production',
|
||||
background: false,
|
||||
debug: false
|
||||
}
|
||||
}
|
||||
},
|
||||
filerev: {
|
||||
options: {
|
||||
copy: false
|
||||
},
|
||||
dist: {
|
||||
cwd: 'dist',
|
||||
src: [ paths.js, paths.css, paths.img ],
|
||||
dest: 'dist',
|
||||
expand: true
|
||||
}
|
||||
},
|
||||
htmlmin: {
|
||||
dist: {
|
||||
options: {
|
||||
removeComments: true,
|
||||
collapseWhitespace: true
|
||||
},
|
||||
files: [ {
|
||||
expand: true,
|
||||
src: [ '<%= paths.dist %>/views/**/**/*.html' ]
|
||||
} ]
|
||||
}
|
||||
},
|
||||
imagemin: {
|
||||
dist: {
|
||||
files: [{
|
||||
expand: true,
|
||||
cwd: './public/images',
|
||||
src: '*.{png,jpg,jpeg}',
|
||||
dest: '<%= paths.dist %>/public/images'
|
||||
}]
|
||||
}
|
||||
},
|
||||
jade: {
|
||||
dist: {
|
||||
options: {
|
||||
pretty: true
|
||||
},
|
||||
files: [ {
|
||||
src: '**/*.jade',
|
||||
dest: '<%= paths.dist %>/views',
|
||||
ext: '.html',
|
||||
cwd: './views',
|
||||
expand: true
|
||||
} ]
|
||||
}
|
||||
},
|
||||
jshint: {
|
||||
all: {
|
||||
src: paths.js,
|
||||
options: {
|
||||
jshintrc: true
|
||||
}
|
||||
}
|
||||
},
|
||||
usemin: {
|
||||
html: [ '<%= paths.dist %>/views/**/**/*.html' ],
|
||||
css: [ '<%= paths.dist %>/public/stylesheets/*.css' ],
|
||||
options: {
|
||||
assetsDirs: [ '<%= paths.dist %>/public' ]
|
||||
}
|
||||
},
|
||||
useminPrepare: {
|
||||
html: '<%= paths.dist %>/views/index.html',
|
||||
options: {
|
||||
root: 'public',
|
||||
dest: '<%= paths.dist %>/public'
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
@ -220,15 +109,12 @@ module.exports = function (grunt) {
|
|||
)
|
||||
})
|
||||
|
||||
// TODO
|
||||
// Build dist directory for production
|
||||
|
||||
// Clean build
|
||||
grunt.registerTask('clean', [], function () {
|
||||
grunt.loadNpmTasks('grunt-contrib-clean')
|
||||
|
||||
grunt.task.run(
|
||||
'clean:dist'
|
||||
'clean:dev'
|
||||
)
|
||||
})
|
||||
}
|
||||
|
|
11
package.json
11
package.json
|
@ -20,7 +20,6 @@
|
|||
"compression": "^1.5.0",
|
||||
"config": "^1.14.0",
|
||||
"connect-livereload": "^0.5.3",
|
||||
"cookie-parser": "^1.3.5",
|
||||
"debug": "^2.2.0",
|
||||
"dezalgo": "^1.0.3",
|
||||
"electron-spawn": "https://github.com/Chocobozzz/electron-spawn",
|
||||
|
@ -29,20 +28,10 @@
|
|||
"grunt": "^0.4.5",
|
||||
"grunt-browserify": "^4.0.1",
|
||||
"grunt-contrib-clean": "^0.6.0",
|
||||
"grunt-contrib-concat": "^0.5.1",
|
||||
"grunt-contrib-copy": "0.8.0",
|
||||
"grunt-contrib-csslint": "^0.4.0",
|
||||
"grunt-contrib-cssmin": "^0.12.3",
|
||||
"grunt-contrib-htmlmin": "^0.4.0",
|
||||
"grunt-contrib-imagemin": "^0.9.4",
|
||||
"grunt-contrib-jade": "^0.14.1",
|
||||
"grunt-contrib-jshint": "^0.11.2",
|
||||
"grunt-contrib-uglify": "^0.9.1",
|
||||
"grunt-contrib-watch": "^0.6.1",
|
||||
"grunt-express-server": "^0.5.1",
|
||||
"grunt-filerev": "^2.3.1",
|
||||
"grunt-newer": "^1.1.1",
|
||||
"grunt-usemin": "^3.0.0",
|
||||
"jade": "^1.10.0",
|
||||
"jquery": "^2.1.4",
|
||||
"js-yaml": "^3.3.1",
|
||||
|
|
Loading…
Reference in a new issue