LaravelTest
72 строки · 2.1 Кб
1"use strict";2
3module.exports = function(grunt) {4
5var pkg = grunt.file.readJSON("package.json");6
7// Project configuration.8grunt.initConfig({9// Metadata.10pkg: pkg,11banner: grunt.file.read("dev/copy.js").replace(/@VERSION/, pkg.version),12// Task configuration.13uglify: {14options: {15banner: "<%= banner %>"16},17dist: {18src: "<%= concat.dist.dest %>",19dest: "<%= pkg.name %>-min.js"20},21nodeps: {22src: "<%= concat.nodeps.dest %>",23dest: "<%= pkg.name %>-nodeps-min.js"24}25},26replace: {27dist: {28options: {29patterns: [{30match: "VERSION",31replacement: "<%= pkg.version %>"32}]33},34files: [{35expand: true,36flatten: true,37src: ["<%= concat.dist.dest %>", "<%= concat.nodeps.dest %>"],38dest: "./"39}]40}41},42concat: {43dist: {44dest: "<%= pkg.name %>.js",45src: [46"dev/eve.js",47"dev/raphael.core.js",48"dev/raphael.svg.js",49"dev/raphael.vml.js",50"dev/raphael.amd.js"51]52},53nodeps: {54dest: "<%= pkg.name %>-nodeps.js",55src: [56"dev/raphael.core.js",57"dev/raphael.svg.js",58"dev/raphael.vml.js",59"dev/raphael.amd.js"60]61}62}63});64
65// These plugins provide necessary tasks.66grunt.loadNpmTasks("grunt-contrib-concat");67grunt.loadNpmTasks("grunt-contrib-uglify");68grunt.loadNpmTasks("grunt-replace");69
70// Default task.71grunt.registerTask("default", ["concat", "replace", "uglify"]);72};73