-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #235 from mischah/feature/minified-version
Add minified version via Grunt/UglifyJS
- Loading branch information
Showing
6 changed files
with
102 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
'use strict'; | ||
|
||
module.exports = function(grunt) { | ||
|
||
// Get devDependencies | ||
require('load-grunt-tasks')(grunt, {scope: 'devDependencies'}); | ||
|
||
// Displays the execution time of grunt tasks | ||
require('time-grunt')(grunt); | ||
|
||
// Config | ||
grunt.initConfig({ | ||
pkg: grunt.file.readJSON('package.json'), | ||
|
||
// uglify | ||
uglify: { | ||
options: { | ||
sourceMap: true, | ||
compress: { | ||
drop_console: true, | ||
drop_debugger: true | ||
}, | ||
banner: '/* <%= pkg.title %> - v<%= pkg.version %>\n' + | ||
' * Copyright ©<%= grunt.template.today("yyyy") %> Mathias Bynens\n' + | ||
' * <%= grunt.template.today("yyyy-mm-dd") %>\n' + | ||
' */' | ||
}, | ||
minify : { | ||
files: { | ||
'jquery.placeholder.min.js': ['jquery.placeholder.js'] | ||
} | ||
} | ||
} | ||
|
||
}); | ||
|
||
/** | ||
* Register own tasks by putting together existing ones | ||
*/ | ||
|
||
// Default task | ||
grunt.registerTask('default', | ||
['uglify'] | ||
); | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"name": "jquery-placeholder", | ||
"version": "2.0.9", | ||
"title": "HTML5 Placeholder jQuery Plugin", | ||
"description": "A jQuery plugin that enables HTML5 placeholder behavior for browsers that aren’t trying hard enough yet", | ||
"author": { | ||
"name": "Mathias Bynens", | ||
"url": "https://mathiasbynens.be/" | ||
}, | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/mathiasbynens/jquery-placeholder.git" | ||
}, | ||
"homepage": "https://github.com/mathiasbynens/jquery-placeholder", | ||
"bugs": { | ||
"url": "https://github.com/mathiasbynens/jquery-placeholder/issues" | ||
}, | ||
"main": "jquery.placeholder.js", | ||
"directories": { | ||
"test": "tests" | ||
}, | ||
"private": true, | ||
"scripts": { | ||
"postinstall": "bower install" | ||
}, | ||
"keywords": [ | ||
"form", | ||
"placeholder", | ||
"jQuery", | ||
"jquery-plugin" | ||
], | ||
"devDependencies": { | ||
"grunt": "^0.4.5", | ||
"grunt-contrib-uglify": "^0.7.0", | ||
"grunt-notify": "^0.4.1", | ||
"load-grunt-tasks": "^2.0.0", | ||
"time-grunt": "^1.0.0" | ||
} | ||
} |