Skip to content

Commit a407081

Browse files
author
Pablo Cantero
committed
Grunt initial add
1 parent 01efd5d commit a407081

19 files changed

+1046
-2739
lines changed

.gitignore

+7-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1-
.project
1+
.project
2+
3+
.grunt
4+
_SpecRunner.html
5+
6+
node_modules
7+
npm-debug.log

.jshintrc

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"curly": true,
3+
"newcap": true,
4+
"noarg": true,
5+
"noempty": true,
6+
"nonew": true,
7+
"quotmark": "single",
8+
"regexp": true,
9+
"trailing": true,
10+
11+
"boss": true,
12+
"eqnull": true,
13+
"expr": true,
14+
15+
"browser": true,
16+
"jquery": true
17+
}

Gruntfile.js

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
module.exports = function(grunt) {
2+
3+
grunt.initConfig({
4+
pkg: grunt.file.readJSON('package.json'),
5+
concat: {
6+
options: {
7+
separator: ';'
8+
},
9+
dist: {
10+
src: ['src/**/*.js'],
11+
dest: 'dist/<%= pkg.name %>.js'
12+
}
13+
},
14+
uglify: {
15+
options: {
16+
banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n'
17+
},
18+
dist: {
19+
files: {
20+
'dist/<%= pkg.name %>.min.js': ['<%= concat.dist.dest %>']
21+
}
22+
}
23+
},
24+
jasmine: {
25+
js: {
26+
src: 'src/**/*.js',
27+
options: {
28+
specs: 'test/*_spec.js',
29+
helpers: 'test/helpers/*',
30+
vendor: 'test/vendor/*'
31+
}
32+
}
33+
},
34+
35+
exec: {
36+
open_spec_runner: {
37+
cmd: 'open _SpecRunner.html'
38+
}
39+
},
40+
41+
jshint: {
42+
files: ['src/**/*.js', 'test/**/*.js'],
43+
options: {
44+
ignores: ['test/vendor/**/*.js']
45+
},
46+
gruntfile: 'Gruntfile.js'
47+
},
48+
watch: {
49+
files: ['<%= jshint.files %>'],
50+
tasks: ['jshint', 'jasmine']
51+
}
52+
});
53+
54+
grunt.loadNpmTasks('grunt-exec');
55+
grunt.loadNpmTasks('grunt-contrib-watch');
56+
grunt.loadNpmTasks('grunt-contrib-uglify');
57+
grunt.loadNpmTasks('grunt-contrib-jshint');
58+
grunt.loadNpmTasks('grunt-contrib-concat');
59+
grunt.loadNpmTasks('grunt-contrib-jasmine');
60+
61+
grunt.registerTask('test', ['jshint', 'jasmine']);
62+
grunt.registerTask('test:browser', ['jasmine:js:build', 'exec:open_spec_runner']);
63+
64+
grunt.registerTask('default', ['jshint', 'jasmine', 'concat', 'uglify']);
65+
};
66+

README.rdoc

+9-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
jquery-dateFormat - It's a jQuery Plugin that I made to formatting java.util.Date.toString output using JavaScript.
1+
jquery-dateFormat - It's a jQuery Plugin to format Date outputs using JavaScript.
22

3-
This plugin is also available on jQuery Plugin page:
3+
== Instalation
44

5-
http://plugins.jquery.com/project/jquery-dateFormat
5+
Download latest jquery.dateFormat.js or jquery.dateFormat.min.js.
66

7-
Blog post to explain the plugin usage:
7+
* https://raw.github.com/phstc/jquery-dateFormat/master/dist/jquery-dateFormat.js
8+
* https://raw.github.com/phstc/jquery-dateFormat/master/dist/jquery-dateFormat.min.js
89

9-
http://pablocantero.com/blog/2010/09/04/jquery-plugin-javascript-for-java-util-date-tostring-format/
10+
Note: jquery-dateFormat.js has a dependency on jQuery 1.4+, which must be loaded before jquery-dateFormat.js.
1011

1112
== Format patterns
1213

@@ -104,9 +105,9 @@ jQuery.format.toBrowserTimeZone(value, format) converts into browsers timezone.
104105
$.format.toBrowserTimeZone(date2)
105106
$.format.toBrowserTimeZone(date3)
106107

107-
== Test
108+
== Testing
108109

109-
This plugin was developed using http://jsunittest.com. To run all tests, open Test.html in your browser.
110+
Tests are written using Jasmine. To run the test suite with PhantomJS, run $ grunt test. To run the test suite in your default browser, run $ grunt test:browser.
110111

111112
== Licenses
112113

@@ -122,3 +123,4 @@ You're welcome to make your contributions and send them as a pull request.
122123
=== Contributors
123124

124125
Thanks to all contributors - https://github.com/phstc/jquery-dateFormat/graphs/contributors.
126+

Test.html

-412
This file was deleted.

assets/.svn/all-wcprops

-17
This file was deleted.

assets/.svn/entries

-103
This file was deleted.

assets/.svn/format

-1
This file was deleted.

0 commit comments

Comments
 (0)