Browse Source

#431: Add built time

nghuuphuoc 11 years ago
parent
commit
b4c7873563

+ 10 - 12
Gruntfile.js

@@ -13,9 +13,8 @@ module.exports = function(grunt) {
         },
 
         banner: [
-            '/**',
+            '/*!',
             ' * BootstrapValidator (<%= pkg.homepage %>)',
-            ' *',
             ' * <%= pkg.description %>',
             ' *',
             ' * @version     v<%= pkg.version %>, built on <%= grunt.template.today("yyyy-mm-dd h:MM:ss TT") %>',
@@ -42,6 +41,7 @@ module.exports = function(grunt) {
             minify: { expand: true, cwd: '<%= dirs.src %>/css/', src: ['*.css'], dest: '<%= dirs.dist %>/css/', ext: '.min.css' },
             add_banner: {
                 options: {
+                    stripBanners: true,
                     banner: '<%= banner %>'
                 },
                 files: {
@@ -51,16 +51,14 @@ module.exports = function(grunt) {
         },
 
         concat: {
+            options: {
+                separator: ';',
+                stripBanners: true,
+                banner: '<%= banner %>'
+            },
             source: {
-                options: {
-                    separator: ';',
-                    stripBanners: true,
-                    banner: '<%= banner %>'
-                },
-                dist: {
-                    src: ['<%= dirs.src %>/js/bootstrapValidator.js', '<%= dirs.src %>/js/validator/*.js'],
-                    dest: '<%= dirs.dist %>/js/bootstrapValidator.js'
-                }
+                src: ['<%= dirs.src %>/js/bootstrapValidator.js', '<%= dirs.src %>/js/validator/*.js'],
+                dest: '<%= dirs.dist %>/js/bootstrapValidator.js'
             }
         },
 
@@ -109,7 +107,7 @@ module.exports = function(grunt) {
     });
 
     grunt.registerTask('default', 'build');
-    grunt.registerTask('build',   ['copy', 'cssmin', 'concat', 'uglify']);
+    grunt.registerTask('build',   ['copy', 'cssmin', 'concat:source', 'uglify']);
 
     grunt.loadNpmTasks('grunt-contrib-concat');
     grunt.loadNpmTasks('grunt-contrib-copy');

+ 0 - 1
dist/css/bootstrapValidator.css

@@ -1,6 +1,5 @@
 /**
  * BootstrapValidator (http://bootstrapvalidator.com)
- *
  * The best jQuery plugin to validate form fields. Designed to use with Bootstrap 3
  *
  * @author      http://twitter.com/nghuuphuoc

+ 2 - 3
dist/css/bootstrapValidator.min.css

@@ -1,9 +1,8 @@
-/**
+/*!
  * BootstrapValidator (http://bootstrapvalidator.com)
- *
  * The best jQuery plugin to validate form fields. Designed to use with Bootstrap 3
  *
- * @version     v0.5.0-dev, built on 2014-06-26 8:48:13 AM
+ * @version     v0.5.0-dev, built on 2014-06-26 9:18:04 AM
  * @author      https://twitter.com/nghuuphuoc
  * @copyright   (c) 2013 - 2014 Nguyen Huu Phuoc
  * @license     MIT

+ 2 - 14
dist/js/bootstrapValidator.js

@@ -1,24 +1,12 @@
-/**
+/*!
  * BootstrapValidator (http://bootstrapvalidator.com)
- *
  * The best jQuery plugin to validate form fields. Designed to use with Bootstrap 3
  *
- * @version     v0.5.0-dev
+ * @version     v0.5.0-dev, built on 2014-06-26 9:18:04 AM
  * @author      https://twitter.com/nghuuphuoc
  * @copyright   (c) 2013 - 2014 Nguyen Huu Phuoc
  * @license     MIT
  */
-
-/**
- * BootstrapValidator (http://bootstrapvalidator.com)
- *
- * The best jQuery plugin to validate form fields. Designed to use with Bootstrap 3
- *
- * @author      http://twitter.com/nghuuphuoc
- * @copyright   (c) 2013 - 2014 Nguyen Huu Phuoc
- * @license     MIT
- */
-
 (function($) {
     var BootstrapValidator = function(form, options) {
         this.$form   = $(form);

+ 2 - 3
dist/js/bootstrapValidator.min.js

@@ -1,9 +1,8 @@
-/**
+/*!
  * BootstrapValidator (http://bootstrapvalidator.com)
- *
  * The best jQuery plugin to validate form fields. Designed to use with Bootstrap 3
  *
- * @version     v0.5.0-dev, built on 2014-06-26 8:48:13 AM
+ * @version     v0.5.0-dev, built on 2014-06-26 9:18:04 AM
  * @author      https://twitter.com/nghuuphuoc
  * @copyright   (c) 2013 - 2014 Nguyen Huu Phuoc
  * @license     MIT

+ 0 - 1
src/css/bootstrapValidator.css

@@ -1,6 +1,5 @@
 /**
  * BootstrapValidator (http://bootstrapvalidator.com)
- *
  * The best jQuery plugin to validate form fields. Designed to use with Bootstrap 3
  *
  * @author      http://twitter.com/nghuuphuoc

+ 0 - 4
src/js/bootstrapValidator.js

@@ -1,15 +1,11 @@
-/*jshint camelcase: true, expr: true, laxbreak: true, loopfunc: true */
-
 /**
  * BootstrapValidator (http://bootstrapvalidator.com)
- *
  * The best jQuery plugin to validate form fields. Designed to use with Bootstrap 3
  *
  * @author      http://twitter.com/nghuuphuoc
  * @copyright   (c) 2013 - 2014 Nguyen Huu Phuoc
  * @license     MIT
  */
-
 (function($) {
     var BootstrapValidator = function(form, options) {
         this.$form   = $(form);