代码拉取完成,页面将自动刷新
'use strict';
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
// Metadata.
pkg: grunt.file.readJSON('Fex-sohu.json'),
banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
'<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' +
'* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */\n',
// Task configuration.
clean: {
files: ['public/out/','public/docs/']
},
copy:{
main:{
expand:true,
cwd:'src/',
src:'**',
dest:['public/out/debug','public/out/release']
}
},
concat: {
options: {
banner: '<%= banner %>',
stripBanners: true
},
dist: {
src: ['public/src/js/**/*.js'],
dest: 'public/out/concat/<%= pkg.name %>.js'
}
},
uglify: {
options: {
banner: '<%= banner %>'
},
dist: {
src: '<%= concat.dist.dest %>',
dest: 'public/out/release/<%= pkg.name %>.min.js'
}
},
qunit: {
files: ['test/**/*.html']
},
jshint: {
options: {
jshintrc: true
},
gruntfile: {
src: 'Gruntfile.js'
},
src: {
src: ['public/src/js/site.js']
}
/* test: {
src: ['test*//*.js']
}*/
},
watch: {
gruntfile: {
files: '<%= jshint.gruntfile.src %>',
tasks: ['jshint:gruntfile']
},
src: {
files: '<%= jshint.src.src %>',
tasks: ['jshint:src', 'qunit']
},
test: {
files: '<%= jshint.test.src %>',
tasks: ['jshint:test', 'qunit']
}
},
jsdoc:{
base:{
src:['public/src/js/*.js'],
options:{
destination:'docs/'
}
}
},
htmlhint:{
build:{
options:{
'tag-pair':true,
'tagname-lowercase':true,
'attr-value-double-quotes':true,
'attr-lowercase':true,
'spec-char-escape':true,
'id-unique':true,
'head-script-disabled':true
},
src:['public/src/*.html']
}
}
}
);
// These plugins provide necessary tasks.
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-qunit');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-jsdoc');
grunt.loadNpmTasks('grunt-htmlhint');
// Default task.
grunt.registerTask('default', ['jshint', 'htmlhint','qunit', 'clean','copy', 'concat', 'uglify']);
};
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。