Browse Source

refactor(grunt): Adds support for minification and minified source map.

Estevão Soares dos Santos 10 năm trước cách đây
mục cha
commit
0a8d2836c7
3 tập tin đã thay đổi với 4 bổ sung13 xóa
  1. 2 13
      Gruntfile.js
  2. 2 0
      dist/showdown.min.js
  3. 0 0
      dist/showdown.min.js.map

+ 2 - 13
Gruntfile.js

@@ -20,6 +20,7 @@ module.exports = function (grunt) {
         },
         uglify: {
             options: {
+                sourceMap: true,
                 banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n'
             },
             dist: {
@@ -55,21 +56,9 @@ module.exports = function (grunt) {
     grunt.loadNpmTasks('grunt-contrib-jshint');
     grunt.loadNpmTasks('grunt-simple-mocha');
 
-    // test
-    /*
-    grunt.registerTask('sourceMapsSupport', function() {
-        'use strict';
-
-        //# sourceMappingURL=path/to/source.map
-        sourceMapSupport.install();
-    });
-    */
-    grunt.registerTask('lint', ['jshint']);
     grunt.registerTask('test', ['jshint', 'concat', 'simplemocha']);
     grunt.registerTask('test-without-building', ['simplemocha']);
-
-    // build with uglify
-    grunt.registerTask('build', ['concat', 'uglify']);
+    grunt.registerTask('build', ['jshint', 'concat', 'test', 'uglify']);
 
     // Default task(s).
     grunt.registerTask('default', []);

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 2 - 0
dist/showdown.min.js


Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 0
dist/showdown.min.js.map


Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác