1 Star 1 Fork 0

静静的灰尘/circle-progress

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Gruntfile.js 2.29 KB
一键复制 编辑 原始数据 按行查看 历史
/* jshint node: true */
'use strict';
module.exports = function (grunt) {
// Load all grunt tasks
require('load-grunt-tasks')(grunt);
// Show elapsed time at the end
require('time-grunt')(grunt);
// Project configuration.
grunt.initConfig({
// Metadata.
pkg: grunt.file.readJSON('package.json'),
banner: `/*!
* Circle Progress - v<%= pkg.version %> - <%= grunt.template.today("yyyy-mm-dd") %>
* <%= pkg.homepage %>
* Copyright (c) <%= pkg.author.name %>
* Licensed <%= pkg.license %>
*/`,
// Task configuration.
clean: {
files: ['dist'],
},
babel: {
vanilla: {
src: 'dist/circle-progress.js',
dest: 'dist/circle-progress.js',
},
jquery: {
src: 'dist/jquery.circle-progress.js',
dest: 'dist/jquery.circle-progress.js',
},
jqueryBare: {
src: 'dist/jquery.circle-progress.bare.js',
dest: 'dist/jquery.circle-progress.bare.js',
},
},
concat: {
options: {
banner: '<%= banner %>\n\n\'use strict\';\n\nconst CircleProgress = (function() {\n',
footer: 'return CircleProgress;\n}());',
stripBanners: true,
process: function(src) {
return src.replace('\'use strict\';\n', '');
},
},
vanilla: {
src: ['src/innersvg.js', 'src/svgpaper.js', 'src/animator.js', 'src/circle-progress.js'],
dest: 'dist/circle-progress.js',
},
jquery: {
src: ['src/innersvg.js', 'src/svgpaper.js', 'src/animator.js', 'src/circle-progress.js', 'lib/jquery.ui.widget.js', 'src/jquery.circle-progress.js'],
dest: 'dist/jquery.circle-progress.js',
},
jqueryBare: {
src: ['src/innersvg.js', 'src/svgpaper.js', 'src/animator.js', 'src/circle-progress.js', 'src/jquery.circle-progress.js'],
dest: 'dist/jquery.circle-progress.bare.js',
}
},
uglify: {
options: {
banner: '<%= banner %>\n',
},
dist: {
files: {
'dist/circle-progress.js': 'dist/circle-progress.js',
'dist/jquery.circle-progress.js': 'dist/jquery.circle-progress.js',
'dist/jquery.circle-progress.bare.js': 'dist/jquery.circle-progress.bare.js',
}
}
},
copy: {
dist: {
dest: 'docs/js/circle-progress.js',
src: 'dist/circle-progress.js',
}
},
watch: {
src: {
files: 'src/**/*',
tasks: ['build'],
}
},
});
grunt.registerTask('build', ['clean', 'concat', 'babel', 'uglify', 'copy']);
};
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/League2st/circle-progress.git
git@gitee.com:League2st/circle-progress.git
League2st
circle-progress
circle-progress
master

搜索帮助