Skip to content

Commit c4fc154

Browse files
committed
Add NPM manifest and Gulp task for minification
1 parent b8eb426 commit c4fc154

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

gulpfile.js

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
var gulp = require('gulp'),
2+
uglify = require('gulp-uglify'),
3+
rename = require('gulp-rename');
4+
5+
gulp.task('compress', function() {
6+
gulp.src('readmore.js')
7+
.pipe(uglify({
8+
mangle: true,
9+
compress: true,
10+
preserveComments: 'some'
11+
}))
12+
.pipe(rename('readmore.min.js'))
13+
.pipe(gulp.dest('./'));
14+
});

package.json

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"name": "Readmore.js",
3+
"version": "2.0.0",
4+
"description": "A lightweight jQuery plugin for collapsing and expanding long blocks of text with \"Read more\" and \"Close\" links.",
5+
"main": "readmore.min.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1"
8+
},
9+
"repository": {
10+
"type": "git",
11+
"url": "https://github.com/jedfoster/Readmore.js.git"
12+
},
13+
"keywords": [
14+
"css",
15+
"jquery",
16+
"readmore",
17+
"expand",
18+
"collapse"
19+
],
20+
"author": "Jed Foster <[email protected]>",
21+
"license": "MIT",
22+
"bugs": {
23+
"url": "https://github.com/jedfoster/Readmore.js/issues"
24+
},
25+
"homepage": "https://github.com/jedfoster/Readmore.js",
26+
"devDependencies": {
27+
"gulp": "^3.8.10",
28+
"gulp-rename": "^1.2.0",
29+
"gulp-uglify": "^1.0.2"
30+
}
31+
}

0 commit comments

Comments
 (0)