[Pkg-javascript-commits] [less.js] 01/285: Updated grunt build to provide a less.js/less.min.js w/o version number. Also added automatic updating of ver from package.json to bower.json.

Jonas Smedegaard dr at jones.dk
Mon Oct 26 23:23:29 UTC 2015


This is an automated email from the git hooks/post-receive script.

js pushed a commit to annotated tag v2.0.0
in repository less.js.

commit 8e180983b3d46ebcf458df35492a0c1b165f9354
Author: Chris Gross <cgross at texeltek.com>
Date:   Tue Nov 26 15:01:52 2013 -0500

    Updated grunt build to provide a less.js/less.min.js w/o version number. Also added automatic updating of ver from package.json to bower.json.
---
 Gruntfile.js | 23 ++++++++++++++++++++++-
 bower.json   |  6 +++---
 package.json |  9 +++++----
 3 files changed, 30 insertions(+), 8 deletions(-)

diff --git a/Gruntfile.js b/Gruntfile.js
index 0a2fa42..1ef3848 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -1,4 +1,5 @@
 'use strict';
+var fs = require('fs');
 
 module.exports = function(grunt) {
 
@@ -88,6 +89,17 @@ module.exports = function(grunt) {
       }
     },
 
+    copy: {
+      stable: {
+        src: 'dist/less-<%= pkg.version %>.js',
+        dest: 'dist/less.js'
+      },
+      stable_min: {
+        src: 'dist/less-<%= pkg.version %>.min.js',
+        dest: 'dist/less.min.js'
+      }
+    },
+
     jshint: {
       options: {jshintrc: '.jshintrc'},
       files: {
@@ -227,7 +239,10 @@ module.exports = function(grunt) {
   // Release
   grunt.registerTask('stable', [
     'concat:stable',
-    'uglify:stable'
+    'uglify:stable',
+    'copy:stable',
+    'copy:stable_min',
+    'updateBowerJson'
   ]);
 
   // Run all browser tests
@@ -270,4 +285,10 @@ module.exports = function(grunt) {
   grunt.registerTask('readme', [
     'concat:readme'
   ]);
+
+  grunt.registerTask('updateBowerJson', function() {
+     var bowerJson = require('./bower.json');
+     bowerJson.version = grunt.config('pkg.version');
+     fs.writeFileSync('./bower.json', JSON.stringify(bowerJson,null,2));
+  });
 };
diff --git a/bower.json b/bower.json
index 482862d..88ab85e 100644
--- a/bower.json
+++ b/bower.json
@@ -1,7 +1,7 @@
 {
   "name": "less",
-  "version": "1.5.0",
-  "main": "./dist/less-1.5.0.js",
+  "version": "1.5.1",
+  "main": "./dist/less.js",
   "ignore": [
     "**/.*",
     "benchmark",
@@ -15,4 +15,4 @@
     "package.json",
     "bower.json"
   ]
-}
+}
\ No newline at end of file
diff --git a/package.json b/package.json
index 16d2bb7..a75291f 100644
--- a/package.json
+++ b/package.json
@@ -48,7 +48,7 @@
   },
   "devDependencies": {
     "diff": "~1.0",
-    "grunt": "~0.4.1",
+    "grunt": "~0.4.2",
     "grunt-contrib-clean": "~0.5.0",
     "grunt-contrib-concat": "~0.3.0",
     "grunt-contrib-connect": "~0.3.0",
@@ -58,8 +58,9 @@
     "grunt-shell": "~0.3.1",
     "http-server": "~0.5.5",
     "matchdep": "~0.1.2",
-    "time-grunt": "~0.1.1"
- },
+    "time-grunt": "~0.1.1",
+    "grunt-contrib-copy": "~0.4.1"
+  },
   "keywords": [
     "compile less",
     "css nesting",
@@ -85,4 +86,4 @@
     "variables in css",
     "css less"
   ]
-}
\ No newline at end of file
+}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/less.js.git



More information about the Pkg-javascript-commits mailing list