UNPKG

1.28 kBJavaScriptView Raw
1module.exports = function (grunt) {
2 grunt.initConfig({
3 pkg: grunt.file.readJSON("package.json"),
4 jshint: {
5 all: [
6 "*.js",
7 "!replaceall.min.js"
8 ]
9 },
10 watch: {
11 files: [
12 "*.js",
13 "!replaceall.min.js"
14 ],
15 tasks: ["test"]
16 },
17 jasmine: {
18 src: "replaceall.min.js",
19 options: {
20 specs: "spec.js"
21 }
22 },
23 uglify: {
24 my_target: {
25 files: {
26 "replaceall.min.js": [
27 "replaceall.js"
28 ]
29 }
30 },
31 options: {
32 banner: "/*!\n " +
33 "<%= pkg.name %> (v<%= pkg.version %>) <%= grunt.template.today('dd-mm-yyyy') %>\n " +
34 "(c) <%= pkg.author %>\n" +
35 "*/\n"
36 }
37 }
38 });
39 grunt.loadNpmTasks("grunt-contrib-watch");
40 grunt.loadNpmTasks("grunt-contrib-jshint");
41 grunt.loadNpmTasks("grunt-contrib-jasmine");
42 grunt.loadNpmTasks("grunt-contrib-uglify");
43 grunt.registerTask("test", ["jshint", "uglify", "jasmine"]);
44};
\No newline at end of file