1 Star 0 Fork 0

石头哥/UED4SOHU

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Gruntfile.js 2.68 KB
一键复制 编辑 原始数据 按行查看 历史
kunqian 提交于 2014-08-27 15:01 . Initial commit
'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']);
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ql434/UED4SOHU.git
git@gitee.com:ql434/UED4SOHU.git
ql434
UED4SOHU
UED4SOHU
master

搜索帮助