diff options
author | Jed Foster <jed@jedfoster.com> | 2015-01-02 17:31:18 -0800 |
---|---|---|
committer | Jed Foster <jed@jedfoster.com> | 2015-01-02 17:31:18 -0800 |
commit | c4fc15431c9bb3363a6f4abe89e8af168fd5ac58 (patch) | |
tree | 71e0073aeb46d3aadd0833ffa52bfae7f8d20cc2 | |
parent | b8eb4265859e4bc70a0e3618d7863da4af4b59e0 (diff) | |
download | Readmore.js-c4fc15431c9bb3363a6f4abe89e8af168fd5ac58.zip Readmore.js-c4fc15431c9bb3363a6f4abe89e8af168fd5ac58.tar.gz Readmore.js-c4fc15431c9bb3363a6f4abe89e8af168fd5ac58.tar.bz2 |
Add NPM manifest and Gulp task for minification
-rw-r--r-- | gulpfile.js | 14 | ||||
-rw-r--r-- | package.json | 31 |
2 files changed, 45 insertions, 0 deletions
diff --git a/gulpfile.js b/gulpfile.js new file mode 100644 index 0000000..32f7268 --- /dev/null +++ b/gulpfile.js @@ -0,0 +1,14 @@ +var gulp = require('gulp'), + uglify = require('gulp-uglify'), + rename = require('gulp-rename'); + +gulp.task('compress', function() { + gulp.src('readmore.js') + .pipe(uglify({ + mangle: true, + compress: true, + preserveComments: 'some' + })) + .pipe(rename('readmore.min.js')) + .pipe(gulp.dest('./')); +}); diff --git a/package.json b/package.json new file mode 100644 index 0000000..609aad1 --- /dev/null +++ b/package.json @@ -0,0 +1,31 @@ +{ + "name": "Readmore.js", + "version": "2.0.0", + "description": "A lightweight jQuery plugin for collapsing and expanding long blocks of text with \"Read more\" and \"Close\" links.", + "main": "readmore.min.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "https://github.com/jedfoster/Readmore.js.git" + }, + "keywords": [ + "css", + "jquery", + "readmore", + "expand", + "collapse" + ], + "author": "Jed Foster <jed@jedfoster.com>", + "license": "MIT", + "bugs": { + "url": "https://github.com/jedfoster/Readmore.js/issues" + }, + "homepage": "https://github.com/jedfoster/Readmore.js", + "devDependencies": { + "gulp": "^3.8.10", + "gulp-rename": "^1.2.0", + "gulp-uglify": "^1.0.2" + } +} |