Skip to content

Commit

Permalink
Add gulp task for minifying
Browse files Browse the repository at this point in the history
Bump version in files
  • Loading branch information
gjunge committed Oct 20, 2016
1 parent 44c28b6 commit 833b0b3
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 16 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Dependency directories
node_modules
bower_components
23 changes: 23 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
This file in the main entry point for defining Gulp tasks and using Gulp plugins.
Click here to learn more. http://go.microsoft.com/fwlink/?LinkId=518007
*/

var gulp = require('gulp');
var uglify = require('gulp-uglify');
var plumber = require('gulp-plumber');
var concat = require('gulp-concat');
var rename = require('gulp-rename');
var sourcemaps = require('gulp-sourcemaps');



gulp.task('default', function () {
return gulp.src('scripts/jquery.rateit.js')
.pipe(sourcemaps.init())
.pipe(plumber())
.pipe(uglify({ preserveComments: 'license' }))
.pipe(rename({ extname: '.min.js' }))
.pipe(sourcemaps.write(''))
.pipe(gulp.dest('scripts')) // save .min.js
});
11 changes: 9 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jquery.rateit",
"version": "1.0.24",
"version": "1.0.25",
"description": "Rating plugin for jQuery.",
"main": "scripts/jquery.rateit.js",
"scripts": {
Expand All @@ -21,6 +21,13 @@
},
"homepage": "https://github.com/gjunge/rateit.js#readme",
"dependencies": {
"jquery": ">=1.6"
"jquery": ">=1.6"
},
"devDependencies": {
"gulp": "~3.9.1",
"gulp-plumber": "~1.1.0",
"gulp-uglify": "~2.0.0",
"gulp-rename": "~1.2.2",
"gulp-sourcemaps": "~2.1.1"
}
}
6 changes: 5 additions & 1 deletion rateit.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>jQuery.RateIt</id>
<version>1.0.23</version>
<version>1.0.25</version>
<title>jQuery.RateIt</title>
<authors>Gidon Junge</authors>
<owners>Gidon Junge</owners>
Expand All @@ -18,6 +18,10 @@ Check out the examples link on the project page for implementation and examples.
<summary>A rating plugin for jQuery.</summary>
<releaseNotes>
==== CHANGE LOG ====
1.0.25
Feature: ability to set value source of SELECT backing field. Either by value (option[value], how it currently works), or by index (selectedIndex, new). Thanks to @maurojs10.
Project: Added gulp task for minifying and sourcemapping.

1.0.23
Move to GitHub.

Expand Down
2 changes: 1 addition & 1 deletion scripts/jquery.rateit.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! RateIt | v1.0.24 / 06/14/2016
/*! RateIt | v1.0.25 / 10/20/2016
https://github.com/gjunge/rateit.js | Twitter: @gjunge
*/
(function ($) {
Expand Down
6 changes: 2 additions & 4 deletions scripts/jquery.rateit.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 833b0b3

Please sign in to comment.