diff --git a/.gitignore b/.gitignore index 083d4f73..873ea138 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,7 @@ *.log *swp +yarn-error.log +yarn.lock # Dependency directories node_modules diff --git a/bower.json b/bower.json index d467eff5..7dfc91a9 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "rickshaw", - "version": "1.6.0-rc.0", + "version": "1.6.0", "description": "Rickshaw is a JavaScript toolkit for creating interactive time series graphs.", "main": "./rickshaw", "license": "MIT", diff --git a/package.json b/package.json index ef32187b..9ee44c8c 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,9 @@ "test": "make && nodeunit tests", "watch": "nodemon --watch src --exec make rickshaw.js", "coverage": "istanbul cover nodeunit tests --reporter=lcov", - "coveralls": "cat ./coverage/lcov.info | coveralls" + "coveralls": "cat ./coverage/lcov.info | coveralls", + "preversion:src": "sed \"s/version: '[^,]*'/version: '$npm_package_version'/\" src/js/Rickshaw.js > output && mv output src/js/Rickshaw.js", + "preversion:bower": "sed 's/\"version\": \"[^,]*\"/\"version\": \"'$npm_package_version'\"/' bower.json > output && mv output bower.json", + "version": "npm run preversion:src && npm run preversion:bower && make clean && make && npm test && git add -A src bower.json rickshaw.js rickshaw.min.js" } } diff --git a/src/js/Rickshaw.js b/src/js/Rickshaw.js index f0ffc1e7..538ff436 100644 --- a/src/js/Rickshaw.js +++ b/src/js/Rickshaw.js @@ -1,6 +1,7 @@ -/* jshint -W079 */ +/* jshint -W079 */ var Rickshaw = { + version: '1.6.0', namespace: function(namespace, obj) { diff --git a/tests/Rickshaw.js b/tests/Rickshaw.js new file mode 100644 index 00000000..7ce0d0cf --- /dev/null +++ b/tests/Rickshaw.js @@ -0,0 +1,8 @@ +var Rickshaw = require('../rickshaw'); +var package = require('../package.json'); + +exports.load = function(test) { + + test.equal(Rickshaw.version, package.version, 'Rickshaw.version is defined'); + test.done(); +};