Skip to content

Commit

Permalink
Updated tooling.
Browse files Browse the repository at this point in the history
  • Loading branch information
dnasir committed Mar 6, 2016
1 parent 8a15da2 commit 12bc6ce
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
2 changes: 1 addition & 1 deletion bower.json
@@ -1,6 +1,6 @@
{
"name": "jquery-cascading-dropdown",
"version": "1.2.6",
"version": "1.2.7",
"homepage": "https://github.com/dnasir/jquery-cascading-dropdown",
"authors": [
"Dzulqarnain Nasir <dzul1983@gmail.com>"
Expand Down
14 changes: 10 additions & 4 deletions gulpfile.js
@@ -1,15 +1,21 @@
var gulp = require('gulp');
var uglifyjs = require('gulp-uglifyjs');
var uglify = require('gulp-uglify');
var header = require('gulp-header');
var sourcemaps = require('gulp-sourcemaps');
var rename = require('gulp-rename');
var pkg = require('./package.json');

var banner = '/*! <%= pkg.name %> <%= pkg.version %> | (c) 2015 <%= pkg.author %> | <%= pkg.license %> */\n';
var year = new Date().getFullYear();
var banner = '/*! <%= pkg.name %> <%= pkg.version %> | (c) ' + year + ' <%= pkg.author %> | <%= pkg.license %> */\n';

gulp.task('js', function() {
gulp.src('src/jquery.cascadingdropdown.js')
.pipe(gulp.dest('dist/'))
.pipe(uglifyjs('jquery.cascadingdropdown.min.js', { outSourceMap: true }))
.pipe(header(banner, { pkg: pkg }))
.pipe(gulp.dest('dist/'))
.pipe(rename('jquery.cascadingdropdown.min.js'))
.pipe(sourcemaps.init())
.pipe(uglify({ preserveComments: 'license' }))
.pipe(sourcemaps.write('./'))
.pipe(gulp.dest('dist/'));
});

Expand Down
10 changes: 6 additions & 4 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "jquery-cascading-dropdown",
"version": "1.2.6",
"version": "1.2.7",
"description": "A simple and lighweight jQuery plugin for creating cascading dropdowns.",
"main": "dist/jquery.cascadingdropdown.js",
"scripts": {
Expand All @@ -23,8 +23,10 @@
"homepage": "https://github.com/dnasir/jquery-cascading-dropdown",
"dependencies": {},
"devDependencies": {
"gulp": "~3.8.11",
"gulp-uglifyjs": "~0.6.1",
"gulp-header": "~1.2.2"
"gulp": "^3.9.1",
"gulp-uglify": "^1.5.3",
"gulp-header": "^1.7.1",
"gulp-sourcemaps": "^1.6.0",
"gulp-rename": "^1.2.2"
}
}

0 comments on commit 12bc6ce

Please sign in to comment.