Skip to content

Commit

Permalink
closes xoxco#196 closes xoxco#208 - Moving to Grunt for minification.…
Browse files Browse the repository at this point in the history
… Updated min.js file to reflect the current non min file
  • Loading branch information
lucknerjb committed Mar 9, 2015
1 parent 4c45439 commit 4a188f1
Show file tree
Hide file tree
Showing 11 changed files with 479 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
bower_components
31 changes: 31 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
function loadConfig(path) {
var glob = require('glob');
var object = {};
var key;

glob.sync('*', {cwd: path}).forEach(function(option) {
key = option.replace(/\.js$/,'');
object[key] = require(path + option);
});

return object;
}

module.exports = function(grunt) {
grunt.loadTasks('grunt-tasks');

require('time-grunt')(grunt);

// Only load tasks when they are needed
require('jit-grunt')(grunt, {
ngtemplates: 'grunt-angular-templates'
});

var config = {
pkg: grunt.file.readJSON('package.json'),
env: process.env
};

grunt.util._.extend(config, loadConfig('./grunt-tasks/options/'));
grunt.initConfig(config);
};
1 change: 1 addition & 0 deletions dist/jquery.tagsinput.min.css

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

1 change: 1 addition & 0 deletions dist/jquery.tagsinput.min.js

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

7 changes: 7 additions & 0 deletions grunt-tasks/assets_production.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = function(grunt) {
grunt.registerTask('assets:production',
[
'cssmin:plugin',
'uglify:plugin'
]);
};
10 changes: 10 additions & 0 deletions grunt-tasks/options/cssmin.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = {
options: {
shorthandCompacting: false
},
plugin: {
files: {
'dist/jquery.tagsinput.min.css': ['src/jquery.tagsinput.css']
}
}
};
10 changes: 10 additions & 0 deletions grunt-tasks/options/uglify.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = {
options: {
mangle: true
},
plugin: {
files: {
'dist/jquery.tagsinput.min.js': ['src/jquery.tagsinput.js']
}
}
};
34 changes: 34 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"name": "jQuery-Tags-Input",
"version": "1.3.3",
"description": "## Note: This project is based off of [the original plugin](https://github.com/xoxco/jQuery-Tags-Input). Unfortunately, it has not been maintained in quite a while (~ 18 months when I started).",
"main": "jquery.tagsinput.js",
"directories": {
"test": "test"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "https://github.com/lucknerjb/jQuery-Tags-Input.git"
},
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/lucknerjb/jQuery-Tags-Input/issues"
},
"homepage": "https://github.com/lucknerjb/jQuery-Tags-Input",
"devDependencies": {
"glob": "^4.3.1",
"grunt": "^0.4.5",
"grunt-contrib-cssmin": "^0.10.0",
"grunt-contrib-uglify": "^0.6.0",
"grunt-contrib-watch": "^0.6.1",
"grunt-newer": "^0.8.0",
"jit-grunt": "^0.8.0",
"load-grunt-tasks": "^0.6.0",
"time-grunt": "^0.4.0",
"grunt-cli": "^0.1.13"
}
}
7 changes: 7 additions & 0 deletions src/jquery.tagsinput.css

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

Loading

0 comments on commit 4a188f1

Please sign in to comment.