1 Star 0 Fork 0

helloyangxp/exceljs

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
gruntfile.js 1.96 KB
一键复制 编辑 原始数据 按行查看 历史
guyonroche 提交于 8年前 . eslinting
'use strict';
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-babel');
grunt.loadNpmTasks('grunt-browserify');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jasmine');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.initConfig({
babel: {
options: {
sourceMap: true
},
dist: {
files: [
{
expand: true,
src: ['./lib/**/*.js', './spec/browser/*.js'],
dest: './build/'
}
]
}
},
browserify: {
bundle: {
src: ['./build/lib/exceljs.browser.js'],
dest: './dist/exceljs.js',
options: {
browserifyOptions: {
standalone: 'ExcelJS'
}
}
},
spec: {
src: ['./build/spec/browser/exceljs.spec.js'],
dest: './build/web/exceljs.spec.js'
},
},
uglify: {
options: {
banner: '/*! ExcelJS <%= grunt.template.today("dd-mm-yyyy") %> */\n'
},
dist: {
files: {
'./dist/exceljs.min.js': ['./dist/exceljs.js']
}
},
// es3: {
// files: [
// {
// expand: true,
// cwd: './build/lib/',
// src: ['*.js', '**/*.js'],
// dest: 'dist/es3/',
// ext: '.js',
// },
// {
// './dist/es3/index.js': ['./build/lib/exceljs.nodejs.js'],
// }
// ],
// },
},
copy: {
dist: {
files: [
{ expand: true, src: ['**'], cwd: './build/lib', dest: './dist/es5' },
{ src: './build/lib/exceljs.nodejs.js', dest: './dist/es5/index.js'},
]
}
},
jasmine: {
dev: {
src: ['./dist/exceljs.js'],
options: {
specs: './build/web/exceljs.spec.js'
}
}
},
});
grunt.registerTask('build', ['babel', 'browserify', 'uglify', 'copy']);
grunt.registerTask('ug', ['uglify']);
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/helloyangxp/exceljs.git
git@gitee.com:helloyangxp/exceljs.git
helloyangxp
exceljs
exceljs
master

搜索帮助