From 967d98380e3065cec9f2ec4c34de0d09b1254e20 Mon Sep 17 00:00:00 2001 From: Jack Moore Date: Tue, 19 May 2015 12:02:43 -0400 Subject: [PATCH] Renamed 'dest' folder to 'dist' to follow common conventions. --- bower.json | 2 +- build.js | 9 ++++++--- changelog.md | 3 +++ {dest => dist}/autosize.js | 16 +++++++--------- {dest => dist}/autosize.min.js | 0 package.json | 12 +++++++++--- 6 files changed, 26 insertions(+), 16 deletions(-) rename {dest => dist}/autosize.js (94%) rename {dest => dist}/autosize.min.js (100%) diff --git a/bower.json b/bower.json index cb84891..f6aa4bc 100644 --- a/bower.json +++ b/bower.json @@ -21,7 +21,7 @@ "type": "git", "url": "http://github.com/jackmoore/autosize.git" }, - "main": "dest/autosize.js", + "main": "dist/autosize.js", "moduleType": [ "amd", "node" diff --git a/build.js b/build.js index a7e75a5..1048775 100644 --- a/build.js +++ b/build.js @@ -57,10 +57,11 @@ function build(code) { '' ].join('\n'); - fs.writeFile('dest/'+pkg.config.filename+'.js', header+code); - fs.writeFile('dest/'+pkg.config.filename+'.min.js', header+minified); + fs.writeFile('dist/'+pkg.config.filename+'.js', header+code); + fs.writeFile('dist/'+pkg.config.filename+'.min.js', header+minified); writeBower(); - console.log('built'); + + console.log('dist built'); } function transform(filepath) { @@ -79,6 +80,8 @@ gaze('src/'+pkg.config.filename+'.js', function(err, watcher){ this.on('changed', function(filepath) { transform(filepath); }); + + console.log('watching'); }); transform('src/'+pkg.config.filename+'.js'); \ No newline at end of file diff --git a/changelog.md b/changelog.md index 3ee8aa8..6650851 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,8 @@ ## Changelog +##### v.3.0.6 - 2015-05-19 +* Renamed 'dest' folder to 'dist' to follow common conventions. + ##### v.3.0.5 - 2015-05-18 * Do nothing in Node.js environment. diff --git a/dest/autosize.js b/dist/autosize.js similarity index 94% rename from dest/autosize.js rename to dist/autosize.js index 5ab0e07..884c7db 100644 --- a/dest/autosize.js +++ b/dist/autosize.js @@ -26,9 +26,9 @@ var _ref$setOverflowY = _ref.setOverflowY; var setOverflowY = _ref$setOverflowY === undefined ? true : _ref$setOverflowY; - if (!ta || !ta.nodeName || ta.nodeName !== 'TEXTAREA' || ta.hasAttribute('data-autosize-on')) { - return; - }var heightOffset = null; + if (!ta || !ta.nodeName || ta.nodeName !== 'TEXTAREA' || ta.hasAttribute('data-autosize-on')) return; + + var heightOffset = null; var overflowY = 'hidden'; function init() { @@ -158,17 +158,15 @@ } function destroy(ta) { - if (!(ta && ta.nodeName && ta.nodeName === 'TEXTAREA')) { - return; - }var evt = document.createEvent('Event'); + if (!(ta && ta.nodeName && ta.nodeName === 'TEXTAREA')) return; + var evt = document.createEvent('Event'); evt.initEvent('autosize:destroy', true, false); ta.dispatchEvent(evt); } function update(ta) { - if (!(ta && ta.nodeName && ta.nodeName === 'TEXTAREA')) { - return; - }var evt = document.createEvent('Event'); + if (!(ta && ta.nodeName && ta.nodeName === 'TEXTAREA')) return; + var evt = document.createEvent('Event'); evt.initEvent('autosize:update', true, false); ta.dispatchEvent(evt); } diff --git a/dest/autosize.min.js b/dist/autosize.min.js similarity index 100% rename from dest/autosize.min.js rename to dist/autosize.min.js diff --git a/package.json b/package.json index 4a58be1..f3ea5bc 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "url": "http://www.jacklmoore.com", "email": "hello@jacklmoore.com" }, - "main": "dest/autosize.js", + "main": "dist/autosize.js", "license": "MIT", "homepage": "http://www.jacklmoore.com/autosize", "demo": "http://www.jacklmoore.com/autosize", @@ -22,10 +22,10 @@ }, "dependencies": {}, "devDependencies": { - "babel": "^5.1.9", + "babel": "^5.4.3", "gaze": "^0.5.1", "jshint": "^2.5.6", - "uglify-js": "^2.4.15" + "uglify-js": "^2.4.22" }, "config": { "bower": { @@ -35,5 +35,11 @@ }, "title": "Autosize", "filename": "autosize" + }, + "scripts": { + "major-release": "npm version major && npm publish && git push --follow-tags", + "minor-release": "npm version minor && npm publish && git push --follow-tags", + "patch-release": "npm version patch && npm publish && git push --follow-tags", + "build": "node build" } }