Skip to content

Commit

Permalink
add grunt minifier
Browse files Browse the repository at this point in the history
  • Loading branch information
mistic100 committed Jun 12, 2014
1 parent 696d1e8 commit 46dcdbd
Show file tree
Hide file tree
Showing 8 changed files with 101 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .gitignore
@@ -0,0 +1,2 @@
bower_components
node_modules
49 changes: 49 additions & 0 deletions Gruntfile.js
@@ -0,0 +1,49 @@
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),

banner:
'/*!\n'+
' * jQuery highlightTextarea <%= pkg.version %>\n'+
' * Copyright <%= grunt.template.today("yyyy") %> Damien "Mistic" Sorel (http://www.strangeplanet.fr)\n'+
' * Licensed under MIT (http://opensource.org/licenses/MIT)\n'+
' */',

// compress js
uglify: {
options: {
banner: '<%= banner %>\n'
},
dist: {
files: {
'jquery.highlighttextarea.min.js': [
'jquery.highlighttextarea.js'
]
}
}
},

// compress css
cssmin: {
options: {
banner: '<%= banner %>',
keepSpecialComments: 0
},
dist: {
files: {
'jquery.highlighttextarea.min.css': [
'jquery.highlighttextarea.css'
]
}
}
}
});

grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-cssmin');

grunt.registerTask('default', [
'uglify',
'cssmin'
]);
};
1 change: 1 addition & 0 deletions bower.json
Expand Up @@ -5,6 +5,7 @@
"name": "Damien \"Mistic\" Sorel",
"homepage": "http://www.strangeplanet.fr"
}],
"description": "Allows to highlight words and sentences into textareas",
"license": "MIT",
"homepage": "http://www.strangeplanet.fr/work/jquery-highlighttextarea",
"main": [
Expand Down
2 changes: 1 addition & 1 deletion jquery.highlighttextarea.css
@@ -1,5 +1,5 @@
/*!
* jQuery highlightTextarea v3.0.0
* jQuery highlightTextarea
* Copyright 2014 Damien "Mistic" Sorel (http://www.strangeplanet.fr)
* Licensed under MIT (http://opensource.org/licenses/MIT)
*/
Expand Down
7 changes: 1 addition & 6 deletions jquery.highlighttextarea.js
@@ -1,13 +1,8 @@
/*!
* jQuery highlightTextarea v3.0.0
* jQuery highlightTextarea
* Copyright 2014 Damien "Mistic" Sorel (http://www.strangeplanet.fr)
* Licensed under MIT (http://opensource.org/licenses/MIT)
*/
/*
* Dependencies:
* - jQuery
* - jQueryUI (optional)
*/

(function($){
"use strict";
Expand Down
6 changes: 6 additions & 0 deletions jquery.highlighttextarea.min.css

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

6 changes: 6 additions & 0 deletions jquery.highlighttextarea.min.js

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

35 changes: 35 additions & 0 deletions package.json
@@ -0,0 +1,35 @@
{
"name": "jquery-highlighttextarea",
"version": "3.0.0",
"author": {
"name": "Damien \"Mistic\" Sorel",
"homepage": "http://www.strangeplanet.fr"
},
"description": "Allows to highlight words and sentences into textareas",
"main": [
"jquery.highlighttextarea.css",
"jquery.highlighttextarea.js"
],
"devDependencies": {
"grunt": "~0.4.5",
"grunt-contrib-uglify": "~0.4.0",
"grunt-contrib-cssmin": "~0.9.0"
},
"keywords": [
"textarea",
"input",
"highlight"
],
"license": "MIT",
"homepage": "https://github.com/mistic100/jquery-highlighttextarea",
"repository": {
"type": "git",
"url": "git://github.com/mistic100/jquery-highlighttextarea.git"
},
"bugs": {
"url": "https://github.com/mistic100/jquery-highlighttextarea/issues"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
}
}

0 comments on commit 46dcdbd

Please sign in to comment.