Skip to content

Commit

Permalink
Fix bad Gruntile setup from previous commit to make the version strin…
Browse files Browse the repository at this point in the history
…g injection actually work.
  • Loading branch information
mikermcneil committed Dec 8, 2016
1 parent d17c1ef commit 9ddd74c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
29 changes: 16 additions & 13 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,23 @@ module.exports = function(grunt) {
to: 'version ' + sioClientPackageJson.version
}]
},
dist: {
distPackageJson: {
src: '<%= PATHS.distPackageJson %>',
dest: '<%= PATHS.distPackageJson %>',
replacements: [
{
from: /"version":\s+"\d+\.\d+\.\d+"/m,
to: '"version": "' + packageJson.version + '"'
},
// Add sails.io.js version string in the fireworks
// at the top of the sails.io.js distributable:
{
from: /(\/\*\*\s*\n\s*\*\s*sails\.io\.js)/m,
to: '$1\n \* v' + packageJson.version
},
]
replacements: [{
from: /"version":\s+"\d+\.\d+\.\d+"/m,
to: '"version": "' + packageJson.version + '"'
}]
},
dist: {
src: '<%= PATHS.dist %>',
dest: '<%= PATHS.dist %>',
// Add sails.io.js version string in the fireworks
// at the top of the sails.io.js distributable:
replacements: [{
from: /(\/\*\*\s*\n\s*\*\s*sails\.io\.js)/m,
to: '$1\n \* v' + packageJson.version
}]
}
},

Expand Down Expand Up @@ -108,6 +110,7 @@ module.exports = function(grunt) {
'uglify',
'concat:header',
'concat:main',
'replace:distPackageJson',
'replace:dist',
'clean'
]);
Expand Down
1 change: 1 addition & 0 deletions dist/sails.io.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ pong:3,message:4,upgrade:5,noop:6},s=i(r),t={type:"error",data:"parser error"},u

/**
* sails.io.js
* v1.1.0
* ------------------------------------------------------------------------
* JavaScript Client (SDK) for communicating with Sails.
*
Expand Down

0 comments on commit 9ddd74c

Please sign in to comment.