File tree Expand file tree Collapse file tree 5 files changed +39
-4
lines changed
Expand file tree Collapse file tree 5 files changed +39
-4
lines changed Original file line number Diff line number Diff line change 11node_modules
22.DS_Store
3+ dist
Original file line number Diff line number Diff line change 11module . exports = function ( grunt ) {
22 grunt . initConfig ( {
3+ pkg : grunt . file . readJSON ( 'package.json' ) ,
4+
35 qunit : {
46 files : [ 'test/index.html' ]
7+ } ,
8+
9+ uglify : {
10+ options : {
11+ banner : '/*!\n' +
12+ '* <%= pkg.name %> JavaScript Library v<%= pkg.version %>\n' +
13+ '* <%= pkg.homepage %>\n' +
14+ '*\n' +
15+ '*\n' +
16+ '* Released under the <%= pkg.license.type %> license\n' +
17+ '* <%= pkg.license.url %>\n' +
18+ '*\n' +
19+ '* Date: <%= grunt.template.today("yyyy-mm-dd") %>\n' +
20+ '*\n' +
21+ '*/\n'
22+ } ,
23+ dist : {
24+ files : { 'dist/<%= pkg.name %>.min.js' : [ '<%= pkg.name %>.js' ] }
25+ }
526 }
627 } ) ;
728
829 grunt . loadNpmTasks ( "grunt-contrib-qunit" ) ;
30+ grunt . loadNpmTasks ( "grunt-contrib-uglify" ) ;
931 grunt . registerTask ( 'test' , 'qunit' ) ;
1032 grunt . registerTask ( 'default' , [ 'qunit' ] ) ;
33+ grunt . registerTask ( 'build' , [ 'qunit' , 'uglify' ] ) ;
1134} ;
Original file line number Diff line number Diff line change @@ -39,6 +39,12 @@ var VerEx = require("verbal-expressions");
3939 (or)
4040 $ grunt test
4141
42+ ## Creating a minified version
43+
44+ This will generate a minified version of VerbalExpressions.js (aptly named VerbalExpressions.min.js) in a _ dist_ folder.
45+
46+ $ grunt build
47+
4248## Examples
4349
4450Here's a couple of simple examples to give an idea of how VerbalExpressions works:
Original file line number Diff line number Diff line change 44 *
55 *
66 * Released under the MIT license
7- * http://jquery .org/license
7+ * http://opensource .org/licenses/MIT
88 *
99 * Date: 2013-07-19
1010 *
Original file line number Diff line number Diff line change 11{
2- "name" : " verbal-expressions " ,
2+ "name" : " VerbalExpressions " ,
33 "description" : " JavaScript Regular expressions made easy" ,
44 "version" : " 0.1.2" ,
55 "keywords" : [ " regular expressions" , " regex" ],
6+ "homepage" : " https://github.com/VerbalExpressions/JSVerbalExpressions" ,
67 "devDependencies" : {
78 "grunt" : " ~0.4.2" ,
8- "grunt-contrib-qunit" : " ~0.2.2"
9+ "grunt-contrib-qunit" : " ~0.2.2" ,
10+ "grunt-contrib-uglify" : " ~0.2.2"
911 },
1012 "repository" : {
1113 "type" : " git" ,
1517 "url" : " https://github.com/VerbalExpressions/JSVerbalExpressions/issues"
1618 },
1719 "main" : " VerbalExpressions.js" ,
18- "license" : " MIT" ,
20+ "license" : {
21+ "type" : " MIT" ,
22+ "url" : " http://opensource.org/licenses/MIT"
23+ },
1924 "engines" : {
2025 "node" : " >= 0.8.0"
2126 }
You can’t perform that action at this time.
0 commit comments