Skip to content

Commit

Permalink
Renamed 'dest' folder to 'dist' to follow common conventions.
Browse files Browse the repository at this point in the history
  • Loading branch information
jackmoore committed May 19, 2015
1 parent 7878be2 commit 967d983
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 16 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"type": "git",
"url": "http://github.com/jackmoore/autosize.git"
},
"main": "dest/autosize.js",
"main": "dist/autosize.js",
"moduleType": [
"amd",
"node"
Expand Down
9 changes: 6 additions & 3 deletions build.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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');
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
16 changes: 7 additions & 9 deletions dest/autosize.js → dist/autosize.js
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -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);
}
Expand Down
File renamed without changes.
12 changes: 9 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"url": "http://www.jacklmoore.com",
"email": "[email protected]"
},
"main": "dest/autosize.js",
"main": "dist/autosize.js",
"license": "MIT",
"homepage": "http://www.jacklmoore.com/autosize",
"demo": "http://www.jacklmoore.com/autosize",
Expand All @@ -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": {
Expand All @@ -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"
}
}

0 comments on commit 967d983

Please sign in to comment.