Skip to content

Commit b991276

Browse files
committed
Development commit 1
This is work in progress and most of it probably isn’t working (not ready for use). I’m switching between computers for development and figured it would be easier to just create a development branch than trying to sync files. People will also be able to see changes in progress. At this point you’ll see I’ve restructured all the files, set the project up with grunt, prefixed the css, and other changes in the main JS file.
1 parent 381c368 commit b991276

Some content is hidden

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

46 files changed

+7206
-3207
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules/
2+
cgi-bin/

.jshintrc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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+
}

Gruntfile.js

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
'use strict';
2+
3+
module.exports = function(grunt) {
4+
5+
// Project configuration.
6+
grunt.initConfig({
7+
// Metadata.
8+
pkg: grunt.file.readJSON('storelocator.jquery.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+
less: {
19+
dist: {
20+
src: 'src/css/storelocator.less',
21+
dest: 'dist/css/storelocator.css'
22+
},
23+
},
24+
concat: {
25+
options: {
26+
stripBanners: true
27+
},
28+
dist: {
29+
src: ['src/js/jquery.<%= pkg.name %>.js'],
30+
dest: 'dist/js/jquery.<%= pkg.name %>.js'
31+
},
32+
},
33+
uglify: {
34+
dist: {
35+
files: {
36+
'dist/js/jquery.<%= pkg.name %>.min.js' : '<%= concat.dist.dest %>',
37+
'dist/js/handlebars.min.js' : 'libs/handlebars/*.js'
38+
}
39+
},
40+
},
41+
qunit: {
42+
files: ['test/**/*.html']
43+
},
44+
jshint: {
45+
gruntfile: {
46+
options: {
47+
jshintrc: '.jshintrc'
48+
},
49+
src: 'Gruntfile.js'
50+
},
51+
src: {
52+
options: {
53+
jshintrc: 'src/.jshintrc'
54+
},
55+
src: ['src/**/*.js']
56+
},
57+
test: {
58+
options: {
59+
jshintrc: 'test/.jshintrc'
60+
},
61+
src: ['test/**/*.js']
62+
},
63+
},
64+
usebanner: {
65+
dist: {
66+
options: {
67+
position: 'top',
68+
banner: '<%= banner %>'
69+
},
70+
files: {
71+
'dist/js/jquery.<%= pkg.name %>.js' : 'dist/js/jquery.<%= pkg.name %>.js',
72+
'dist/js/jquery.<%= pkg.name %>.min.js' : 'dist/js/jquery.<%= pkg.name %>.min.js'
73+
}
74+
},
75+
},
76+
cssmin: {
77+
dist: {
78+
files: {
79+
'dist/css/storelocator.min.css' : 'dist/css/storelocator.css'
80+
}
81+
},
82+
},
83+
watch: {
84+
gruntfile: {
85+
files: '<%= jshint.gruntfile.src %>',
86+
tasks: ['jshint:gruntfile']
87+
},
88+
src: {
89+
files: ['src/**/*'],
90+
tasks: ['less', 'concat', 'uglify', 'usebanner', 'cssmin']
91+
},
92+
test: {
93+
files: '<%= jshint.test.src %>',
94+
tasks: ['jshint:test', 'qunit']
95+
},
96+
},
97+
});
98+
99+
// These plugins provide necessary tasks.
100+
grunt.loadNpmTasks('grunt-contrib-clean');
101+
grunt.loadNpmTasks('grunt-contrib-less');
102+
grunt.loadNpmTasks('grunt-contrib-concat');
103+
grunt.loadNpmTasks('grunt-contrib-uglify');
104+
grunt.loadNpmTasks('grunt-contrib-qunit');
105+
grunt.loadNpmTasks('grunt-contrib-jshint');
106+
grunt.loadNpmTasks('grunt-contrib-watch');
107+
grunt.loadNpmTasks('grunt-banner');
108+
grunt.loadNpmTasks('grunt-contrib-cssmin');
109+
110+
// Default task.
111+
grunt.registerTask('default', ['jshint', 'qunit', 'less', 'concat', 'uglify', 'usebanner', 'cssmin']);
112+
// Build
113+
grunt.registerTask('build', ['less', 'concat', 'uglify', 'usebanner', 'cssmin']);
114+
//Watch src build
115+
grunt.registerTask('watchsrc', ['watch:src']);
116+
117+
};

css/map-style.css

Lines changed: 0 additions & 1 deletion
This file was deleted.

css/map.css

Lines changed: 0 additions & 222 deletions
This file was deleted.

0 commit comments

Comments
 (0)