diff --git a/bower.json b/bower.json deleted file mode 100644 index f6aa4bc..0000000 --- a/bower.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "autosize", - "description": "Autosize is a small, stand-alone script to automatically adjust textarea height to fit text.", - "dependencies": {}, - "keywords": [ - "textarea", - "form", - "ui" - ], - "authors": [ - { - "name": "Jack Moore", - "url": "http://www.jacklmoore.com", - "email": "hello@jacklmoore.com" - } - ], - "license": "MIT", - "homepage": "http://www.jacklmoore.com/autosize", - "ignore": [], - "repository": { - "type": "git", - "url": "http://github.com/jackmoore/autosize.git" - }, - "main": "dist/autosize.js", - "moduleType": [ - "amd", - "node" - ] -} \ No newline at end of file diff --git a/build.js b/build.js index 83246e9..4bb2c52 100644 --- a/build.js +++ b/build.js @@ -5,24 +5,6 @@ var jshint = require('jshint').JSHINT; var babel = require('babel'); var gaze = require('gaze'); -function writeBower() { - var bower = { - name: pkg.config.bower.name, - description: pkg.description, - dependencies: pkg.dependencies, - keywords: pkg.keywords, - authors: [pkg.author], - license: pkg.license, - homepage: pkg.homepage, - ignore: pkg.config.bower.ignore, - repository: pkg.repository, - main: pkg.main, - moduleType: pkg.config.bower.moduleType, - }; - fs.writeFile('bower.json', JSON.stringify(bower, null, '\t')); - return true; -} - function lint(full) { jshint(full.toString(), { browser: true, @@ -49,18 +31,16 @@ function lint(full) { function build(code) { var minified = ugly.minify(code, {fromString: true}).code; var header = [ - '/*!', - ' '+pkg.config.title+' '+pkg.version, - ' license: MIT', - ' '+pkg.homepage, - '*/', - '' + `/*!`, + ` ${pkg.name} ${pkg.version}`, + ` license: ${pkg.license}`, + ` ${pkg.homepage}`, + `*/`, + `` ].join('\n'); - fs.writeFile('dist/'+pkg.config.filename+'.js', header+code); - fs.writeFile('dist/'+pkg.config.filename+'.min.js', header+minified); - writeBower(); - + fs.writeFile('dist/'+pkg.name+'.js', header+code); + fs.writeFile('dist/'+pkg.name+'.min.js', header+minified); console.log('dist built'); } @@ -75,7 +55,7 @@ function transform(filepath) { }); } -gaze('src/'+pkg.config.filename+'.js', function(err, watcher){ +gaze('src/'+pkg.name+'.js', function(err, watcher){ // On file changed this.on('changed', function(filepath) { transform(filepath); @@ -84,4 +64,4 @@ gaze('src/'+pkg.config.filename+'.js', function(err, watcher){ console.log('watching'); }); -transform('src/'+pkg.config.filename+'.js'); \ No newline at end of file +transform('src/'+pkg.name+'.js'); \ No newline at end of file diff --git a/package.json b/package.json index 6760d73..3d746d5 100644 --- a/package.json +++ b/package.json @@ -31,18 +31,6 @@ "jshint": "^2.9.4", "uglify-js": "^2.7.4" }, - "config": { - "bower": { - "name": "autosize", - "ignore": [], - "moduleType": [ - "amd", - "node" - ] - }, - "title": "Autosize", - "filename": "autosize" - }, "scripts": { "build": "node build" }