| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,41 @@ | |||
| 1 | + module.exports = function (grunt) { | ||
| 2 | + | ||
| 3 | + "use strict"; | ||
| 4 | + | ||
| 5 | + // Project configuration. | ||
| 6 | + grunt.initConfig({ | ||
| 7 | + pkg: grunt.file.readJSON("package.json"), | ||
| 8 | + jshint: { | ||
| 9 | + all: { | ||
| 10 | + src: [ "src/*.js", "test/*.js" ], | ||
| 11 | + options: { | ||
| 12 | + jshintrc: ".jshintrc" | ||
| 13 | + } | ||
| 14 | + } | ||
| 15 | + }, | ||
| 16 | + uglify: { | ||
| 17 | + dist: { | ||
| 18 | + src: [ "<banner:meta.banner>", "src/paypal-button.js" ], | ||
| 19 | + dest: "dist/paypal-button.min.js", | ||
| 20 | + options: { | ||
| 21 | + banner: "/*!\n * <%= pkg.name %>\n * <%= pkg.description %>\n * @version <%= pkg.version %> - <%= grunt.template.today(\'yyyy-mm-dd, h:MM:ss TT\') %>\n * @author <%= pkg.author.name %> <<%= pkg.author.url %>>\n */" | ||
| 22 | + } | ||
| 23 | + }, | ||
| 24 | + bundled: { | ||
| 25 | + src: [ "<banner:meta.banner>", "lib/MiniCart/minicart.js", "src/paypal-button.js" ], | ||
| 26 | + dest: "dist/paypal-button-minicart.min.js", | ||
| 27 | + options: { | ||
| 28 | + banner: "/*!\n * <%= pkg.name %>\n * <%= pkg.description %>\n * @version <%= pkg.version %> - <%= grunt.template.today(\'yyyy-mm-dd, h:MM:ss TT\') %>\n * @author <%= pkg.author.name %> <<%= pkg.author.url %>>\n */" | ||
| 29 | + } | ||
| 30 | + } | ||
| 31 | + } | ||
| 32 | + }); | ||
| 33 | + | ||
| 34 | + // Load grunt tasks from npm packages | ||
| 35 | + grunt.loadNpmTasks("grunt-contrib-jshint"); | ||
| 36 | + grunt.loadNpmTasks("grunt-contrib-uglify"); | ||
| 37 | + | ||
| 38 | + // Default task. | ||
| 39 | + grunt.registerTask("default", [ "uglify" ]); | ||
| 40 | + | ||
| 41 | + }; | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments