-
-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Caching variables in closure scope, upgraded to grunt 0.4.0, fixed li…
…cense link in README.md Minor version bump Dropping support for node.js 0.6.x (too old for build tool) Updating travis-ci.org file Major version bump due to change of node.js requirements Alignment
- Loading branch information
Showing
10 changed files
with
118 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
node_modules/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
.idea | ||
dist | ||
src | ||
test | ||
/node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
language: node_js | ||
node_js: | ||
- 0.6 | ||
- 0.8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
module.exports = function(grunt) { | ||
grunt.initConfig({ | ||
pkg : grunt.file.readJSON("package.json"), | ||
concat: { | ||
options : { | ||
banner : "/**\n" + | ||
" * <%= pkg.name %>\n" + | ||
" *\n" + | ||
" * @author <%= pkg.author.name %> <<%= pkg.author.email %>>\n" + | ||
" * @copyright <%= grunt.template.today('yyyy') %> <%= pkg.author.name %>\n" + | ||
" * @license <%= pkg.licenses[0].type %> <<%= pkg.licenses[0].url %>>\n" + | ||
" * @link <%= pkg.homepage %>\n" + | ||
" * @module <%= pkg.name %>\n" + | ||
" * @version <%= pkg.version %>\n" + | ||
" */\n" | ||
}, | ||
dist: { | ||
src : [ | ||
"<banner>", | ||
"src/filesize.js" | ||
], | ||
dest : "lib/filesize.js" | ||
} | ||
}, | ||
nodeunit: { | ||
all : ["test/*.js"] | ||
}, | ||
uglify: { | ||
options: { | ||
banner : "/**\n" + | ||
" * <%= pkg.name %>\n" + | ||
" *\n" + | ||
" * @author <%= pkg.author.name %> <<%= pkg.author.email %>>\n" + | ||
" * @copyright <%= grunt.template.today('yyyy') %> <%= pkg.author.name %>\n" + | ||
" * @license <%= pkg.licenses[0].type %> <<%= pkg.licenses[0].url %>>\n" + | ||
" * @link <%= pkg.homepage %>\n" + | ||
" * @module <%= pkg.name %>\n" + | ||
" * @version <%= pkg.version %>\n" + | ||
" */\n", | ||
mangle: { | ||
except: ["filesize"] | ||
} | ||
}, | ||
target: { | ||
files: { | ||
"lib/<%= pkg.name %>.min.js" : ["<%= concat.dist.dest %>"] | ||
} | ||
} | ||
} | ||
}); | ||
|
||
grunt.loadNpmTasks("grunt-contrib-concat"); | ||
grunt.loadNpmTasks("grunt-contrib-nodeunit"); | ||
grunt.loadNpmTasks("grunt-contrib-uglify"); | ||
|
||
grunt.registerTask("test", ["nodeunit"]); | ||
|
||
grunt.registerTask("version", function () { | ||
var cfg = grunt.config("pkg"), | ||
ver = cfg.version, | ||
fn = "lib/" + cfg.name + ".js", | ||
fp = grunt.file.read(fn); | ||
|
||
console.log("Setting version to: " + ver); | ||
grunt.file.write(fn, fp.replace(/\{\{VERSION\}\}/g, ver)); | ||
}); | ||
|
||
grunt.registerTask("default", ["concat", "version", "uglify", "test"]); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters