Permalink
Browse files

Add `noVersion` option.

Having to update the filename references to one's built file every time a new version is released has caused flatiron/director lots and lots of pain. Turning this off would be nice, without losing the `packageJSON` features.
  • Loading branch information...
domenic committed Sep 18, 2012
1 parent 5d2c18e commit 571cd2822bd5f84438ae5aee529696ec1fa38fb9
Showing with 2 additions and 1 deletion.
  1. +1 −0 README.md
  2. +1 −1 lib/codesurgeon.js
View
@@ -172,6 +172,7 @@ The constructor function provides an instance of the Codesurgen.
@param conf {Object} a json object literal that can contain configuration options.
@member encoding {String} the encoding that will be used to product the result.
@member quiet {String} indicate how much logging you want Codesurgen to produce.
+ @member noVersion {Boolean} true if you don't want Codesurgeon to automatically version your output filename.
```
## Instance Methods
View
@@ -475,7 +475,7 @@ Codesurgeon.prototype.write = function (file, callback, flags) {
!this.options.quiet && console.log('Write file [' + file.green + ']');
if(this.packageJSON) {
- if(file.substr(-3) === '.js') {
+ if(!this.options.noVersion && file.substr(-3) === '.js') {
//
// assume that the part of the name before the first dot is the name

0 comments on commit 571cd28

Please sign in to comment.