1 Star 0 Fork 0

Oxrial/element-resize-detector

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Gruntfile.js 2.84 KB
一键复制 编辑 原始数据 按行查看 历史
Lucas Wiener 提交于 2017-02-20 19:34 . Removed unused saucelabs.
/* global process:false */
"use strict";
var _ = require("lodash");
module.exports = function(grunt) {
require("load-grunt-tasks")(grunt);
var config = {
pkg: grunt.file.readJSON("package.json"),
banner: "/*!\n" +
" * element-resize-detector <%= pkg.version %>\n" +
" * Copyright (c) 2016 Lucas Wiener\n" +
" * <%= pkg.homepage %>\n" +
" * Licensed under <%= pkg.license %>\n" +
" */\n",
jshint: {
src: {
src: ["src/**/*.js", "*.js"]
},
test: {
src: "test/**/*.js"
},
options: {
jshintrc: true
}
},
browserify: {
dev: {
src: ["src/element-resize-detector.js"],
dest: "build/element-resize-detector.js",
options: {
browserifyOptions: {
standalone: "elementResizeDetectorMaker",
debug: true
}
}
},
dist: {
src: ["src/element-resize-detector.js"],
dest: "dist/element-resize-detector.js",
options: {
browserifyOptions: {
standalone: "elementResizeDetectorMaker"
}
}
}
},
usebanner: {
dist: {
options: {
position: "top",
banner: "<%= banner %>"
},
files: {
src: "dist/**/*"
}
}
},
uglify: {
dist: {
files: {
"dist/element-resize-detector.min.js": "dist/element-resize-detector.js"
}
}
},
karma: {
local: {
configFile: "karma.conf.js",
options: {
browsers: [
"Chrome",
"Safari",
"Firefox",
//"IE8 - Win7",
//"IE10 - Win7",
//"IE11 - Win8.1"
],
singleRun: true
}
}
}
};
grunt.initConfig(config);
grunt.registerTask("build:dev", ["browserify:dev"]);
grunt.registerTask("build:dist", ["browserify:dist"]);
grunt.registerTask("build", ["build:dev"]);
grunt.registerTask("dist", ["build:dist", "uglify:dist", "usebanner:dist"]);
grunt.registerTask("test:style", ["jshint"]);
grunt.registerTask("test", ["test:style", "build:dev", "karma:local"]);
grunt.registerTask("ci", ["test:style"]);
grunt.registerTask("default", ["test"]);
};
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/oxrial/element-resize-detector.git
git@gitee.com:oxrial/element-resize-detector.git
oxrial
element-resize-detector
element-resize-detector
master

搜索帮助