Skip to content

Commit 51e8a3a

Browse files
Migrate to grunt setup
1 parent 8a812ed commit 51e8a3a

File tree

92 files changed

+4162
-6
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+4162
-6
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
/node_modules/
12
*.iml
23
.idea

.jshintrc

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"curly": true,
3+
"eqeqeq": true,
4+
"immed": true,
5+
"latedef": true,
6+
"newcap": true,
7+
"noarg": true,
8+
"sub": true,
9+
"undef": true,
10+
"unused": true,
11+
"boss": true,
12+
"eqnull": true,
13+
"node": true,
14+
"es5": true
15+
}

CONTRIBUTING.md

+31

Gruntfile.js

+121
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
'use strict';
2+
3+
module.exports = function(grunt) {
4+
5+
// Project configuration.
6+
grunt.initConfig({
7+
// Metadata.
8+
pkg: grunt.file.readJSON('jquery-ui-timepicker-addon.json'),
9+
banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
10+
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
11+
'<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' +
12+
'* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
13+
' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */\n',
14+
// Task configuration.
15+
clean: {
16+
files: ['dist']
17+
},
18+
copy: {
19+
dist: {
20+
files: [
21+
{ src: 'src/index.html', dest: 'dist/index.html' },
22+
{ src: 'src/<%= pkg.name %>.css', dest: 'dist/<%= pkg.name %>.css' },
23+
{ src: 'src/i18n/jquery-ui-timepicker-*.js', dest: 'dist/i18n/', expand:true, flatten: true },
24+
]
25+
}
26+
},
27+
concat: {
28+
dist: {
29+
options: {
30+
banner: '<%= banner %>',
31+
stripBanners: true
32+
},
33+
src: ['src/<%= pkg.name %>.js'],
34+
dest: 'dist/<%= pkg.name %>.js'
35+
}/*,
36+
docs: {
37+
src: [
38+
'src/docs/header.html',
39+
'src/docs/intro.html',
40+
'src/docs/options.html',
41+
'src/docs/methods.html',
42+
'src/docs/events.html',
43+
'src/docs/formatting.html',
44+
'src/docs/i18n.html',
45+
'src/docs/examples.html',
46+
'src/docs/footer.html'
47+
],
48+
dest: 'dist/index.html'
49+
}*/
50+
},
51+
uglify: {
52+
options: {
53+
banner: '<%= banner %>'
54+
},
55+
dist: {
56+
src: '<%= concat.dist.dest %>',
57+
dest: 'dist/<%= pkg.name %>.min.js'
58+
},
59+
},
60+
cssmin: {
61+
options: {
62+
banner: '<%= banner %>'
63+
},
64+
dist: {
65+
src: 'dist/<%= pkg.name %>.css',
66+
dest: 'dist/<%= pkg.name %>.min.css'
67+
},
68+
},
69+
jasmine: {
70+
files: ['test/**/*.html']
71+
},
72+
jshint: {
73+
gruntfile: {
74+
options: {
75+
jshintrc: '.jshintrc'
76+
},
77+
src: 'Gruntfile.js'
78+
},
79+
src: {
80+
options: {
81+
jshintrc: 'src/.jshintrc'
82+
},
83+
src: ['src/**/*.js']
84+
},
85+
test: {
86+
options: {
87+
jshintrc: 'test/.jshintrc'
88+
},
89+
src: ['test/**/*.js']
90+
},
91+
},
92+
watch: {
93+
gruntfile: {
94+
files: '<%= jshint.gruntfile.src %>',
95+
tasks: ['jshint:gruntfile']
96+
},
97+
src: {
98+
files: 'src/**',//'<%= jshint.src.src %>',
99+
tasks: ['jshint:src', 'clean', 'less', 'copy', 'concat', 'uglify', 'cssmin']
100+
},
101+
test: {
102+
files: '<%= jshint.test.src %>',
103+
tasks: ['jshint:test', 'jasmine']
104+
},
105+
},
106+
});
107+
108+
// These plugins provide necessary tasks.
109+
grunt.loadNpmTasks('grunt-contrib-clean');
110+
grunt.loadNpmTasks('grunt-contrib-concat');
111+
grunt.loadNpmTasks('grunt-contrib-copy');
112+
grunt.loadNpmTasks('grunt-contrib-uglify');
113+
grunt.loadNpmTasks('grunt-contrib-cssmin');
114+
grunt.loadNpmTasks('grunt-contrib-jasmine');
115+
grunt.loadNpmTasks('grunt-contrib-jshint');
116+
grunt.loadNpmTasks('grunt-contrib-watch');
117+
118+
// Default task.
119+
grunt.registerTask('default', ['jshint', 'jasmine', 'clean', 'copy', 'concat', 'uglify', 'cssmin']);
120+
121+
};

LICENSE-MIT

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Copyright (c) 2013 Trent Richardson
2+
3+
Permission is hereby granted, free of charge, to any person
4+
obtaining a copy of this software and associated documentation
5+
files (the "Software"), to deal in the Software without
6+
restriction, including without limitation the rights to use,
7+
copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
copies of the Software, and to permit persons to whom the
9+
Software is furnished to do so, subject to the following
10+
conditions:
11+
12+
The above copyright notice and this permission notice shall be
13+
included in all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22+
OTHER DEALINGS IN THE SOFTWARE.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)