1 Star 0 Fork 34

忆惜流年/autocjs

forked from Yaohaixiao/outline.js 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Gruntfile.js 5.62 KB
一键复制 编辑 原始数据 按行查看 历史
yaohaixiao 提交于 2017-08-16 11:51 . v1.3.0'
module.exports = function ( grunt ) {
grunt.initConfig( {
pkg: grunt.file.readJSON( 'package.json' ),
banner: '/*!\n' +
'* <%= pkg.name %> v<%= pkg.version %> - <%= pkg.description %>\n' +
'* Copyright (c) <%= grunt.template.today(\'yyyy\') %> <%= pkg.author %>. All rights reserved.\n' +
'* Licensed under <%= pkg.license %> License.\n' +
'*/',
connect: {
docs: {
options: {
protocol: 'http',
port: 8080,
hostname: 'localhost',
livereload: true,
base: {
path: 'docs/',
options: {
index: 'index.htm'
}
},
open: 'http://localhost:8080/index.htm'
}
}
},
sass: {
docs: {
options: {
style: 'expanded'
},
files: {
'dist/autoc.css': 'src/sass/autoc.scss',
'docs/css/layout.css': 'sass/layout.scss'
}
}
},
csslint: {
docs: {
options: {
'bulletproof-font-face': false,
'order-alphabetical': false,
'box-model': false,
'vendor-prefix': false,
'known-properties': false
},
src: [
'dist/autoc.css',
'docs/css/layout.css'
]
}
},
cssmin: {
dist: {
files: {
'dist/autoc.min.css': [
'dist/autoc.css'
]
}
},
docs: {
files: {
'docs/css/layout.min.css': [
'node_modules/normalize.css/normalize.css',
'docs/css/layout.css',
'dist/autoc.css'
]
}
}
},
jshint: {
src: {
options: {
jshintrc: '.jshintrc'
},
src: [
'src/**/*.js'
],
filter: 'isFile'
}
},
uglify: {
options: {
banner: '<%= banner %>'
},
docs: {
files: {
'docs/js/autoc.min.js': [
'src/autoc.js'
]
}
},
dist: {
files: {
'dist/autoc.min.js': [
'src/autoc.js'
]
}
}
},
copy: {
docs: {
files: [
{
'docs/js/jquery.js': 'node_modules/jquery/dist/jquery.js'
}
]
},
dist: {
files: [
{
'dist/autoc.js': 'src/autoc.js'
}
]
}
},
pug: {
docs: {
options: {
pretty: true,
data: {
debug: true
}
},
files: {
// create api home page
'docs/index.htm': 'pug/api/index.pug'
}
}
},
watch: {
css: {
files: [
'sass/**/**.scss'
],
tasks: [
'sass',
'csslint',
'cssmin'
]
},
js: {
files: [
'src/**/*.js'
],
tasks: [
'jshint:src',
'uglify',
'copy:docs'
]
},
pug: {
files: [
'pug/**/**.pug'
],
tasks: [
'pug:docs'
]
},
docs: {
files: [
'docs/**/**.html',
'docs/**/**.js',
'docs/**/**.css'
],
options: {
livereload: true
}
}
}
} );
grunt.loadNpmTasks( 'grunt-contrib-connect' );
grunt.loadNpmTasks( 'grunt-contrib-copy' );
grunt.loadNpmTasks( 'grunt-contrib-sass' );
grunt.loadNpmTasks( 'grunt-contrib-csslint' );
grunt.loadNpmTasks( 'grunt-contrib-cssmin' );
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.loadNpmTasks( 'grunt-contrib-uglify' );
grunt.loadNpmTasks( 'grunt-contrib-pug' );
grunt.loadNpmTasks( 'grunt-contrib-watch' );
grunt.registerTask( 'html', [ 'pug' ] );
grunt.registerTask( 'http', [
'connect:docs',
'watch'
] );
grunt.registerTask( 'hint', [ 'jshint:src' ] );
grunt.registerTask( 'scripts', [
'jshint',
'uglify',
'copy'
] );
grunt.registerTask( 'styles', [
'sass',
'csslint',
'cssmin'
] );
grunt.registerTask( 'default', [
'connect:docs',
'sass',
'csslint',
'cssmin',
'jshint:src',
'uglify',
'copy',
'pug',
'watch'
] );
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/markowner/AutocJS.git
git@gitee.com:markowner/AutocJS.git
markowner
AutocJS
autocjs
master

搜索帮助