forked from bjorn2404/jQuery-Store-Locator-Plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
46 changed files
with
7,206 additions
and
3,207 deletions.
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,2 @@ | ||
node_modules/ | ||
cgi-bin/ |
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,14 @@ | ||
{ | ||
"curly": true, | ||
"eqeqeq": true, | ||
"immed": true, | ||
"latedef": true, | ||
"newcap": true, | ||
"noarg": true, | ||
"sub": true, | ||
"undef": true, | ||
"unused": true, | ||
"boss": true, | ||
"eqnull": true, | ||
"node": true | ||
} |
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,117 @@ | ||
'use strict'; | ||
|
||
module.exports = function(grunt) { | ||
|
||
// Project configuration. | ||
grunt.initConfig({ | ||
// Metadata. | ||
pkg: grunt.file.readJSON('storelocator.jquery.json'), | ||
banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' + | ||
'<%= grunt.template.today("yyyy-mm-dd") %>\n' + | ||
'<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' + | ||
'* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' + | ||
' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */\n', | ||
// Task configuration. | ||
clean: { | ||
files: ['dist'] | ||
}, | ||
less: { | ||
dist: { | ||
src: 'src/css/storelocator.less', | ||
dest: 'dist/css/storelocator.css' | ||
}, | ||
}, | ||
concat: { | ||
options: { | ||
stripBanners: true | ||
}, | ||
dist: { | ||
src: ['src/js/jquery.<%= pkg.name %>.js'], | ||
dest: 'dist/js/jquery.<%= pkg.name %>.js' | ||
}, | ||
}, | ||
uglify: { | ||
dist: { | ||
files: { | ||
'dist/js/jquery.<%= pkg.name %>.min.js' : '<%= concat.dist.dest %>', | ||
'dist/js/handlebars.min.js' : 'libs/handlebars/*.js' | ||
} | ||
}, | ||
}, | ||
qunit: { | ||
files: ['test/**/*.html'] | ||
}, | ||
jshint: { | ||
gruntfile: { | ||
options: { | ||
jshintrc: '.jshintrc' | ||
}, | ||
src: 'Gruntfile.js' | ||
}, | ||
src: { | ||
options: { | ||
jshintrc: 'src/.jshintrc' | ||
}, | ||
src: ['src/**/*.js'] | ||
}, | ||
test: { | ||
options: { | ||
jshintrc: 'test/.jshintrc' | ||
}, | ||
src: ['test/**/*.js'] | ||
}, | ||
}, | ||
usebanner: { | ||
dist: { | ||
options: { | ||
position: 'top', | ||
banner: '<%= banner %>' | ||
}, | ||
files: { | ||
'dist/js/jquery.<%= pkg.name %>.js' : 'dist/js/jquery.<%= pkg.name %>.js', | ||
'dist/js/jquery.<%= pkg.name %>.min.js' : 'dist/js/jquery.<%= pkg.name %>.min.js' | ||
} | ||
}, | ||
}, | ||
cssmin: { | ||
dist: { | ||
files: { | ||
'dist/css/storelocator.min.css' : 'dist/css/storelocator.css' | ||
} | ||
}, | ||
}, | ||
watch: { | ||
gruntfile: { | ||
files: '<%= jshint.gruntfile.src %>', | ||
tasks: ['jshint:gruntfile'] | ||
}, | ||
src: { | ||
files: ['src/**/*'], | ||
tasks: ['less', 'concat', 'uglify', 'usebanner', 'cssmin'] | ||
}, | ||
test: { | ||
files: '<%= jshint.test.src %>', | ||
tasks: ['jshint:test', 'qunit'] | ||
}, | ||
}, | ||
}); | ||
|
||
// These plugins provide necessary tasks. | ||
grunt.loadNpmTasks('grunt-contrib-clean'); | ||
grunt.loadNpmTasks('grunt-contrib-less'); | ||
grunt.loadNpmTasks('grunt-contrib-concat'); | ||
grunt.loadNpmTasks('grunt-contrib-uglify'); | ||
grunt.loadNpmTasks('grunt-contrib-qunit'); | ||
grunt.loadNpmTasks('grunt-contrib-jshint'); | ||
grunt.loadNpmTasks('grunt-contrib-watch'); | ||
grunt.loadNpmTasks('grunt-banner'); | ||
grunt.loadNpmTasks('grunt-contrib-cssmin'); | ||
|
||
// Default task. | ||
grunt.registerTask('default', ['jshint', 'qunit', 'less', 'concat', 'uglify', 'usebanner', 'cssmin']); | ||
// Build | ||
grunt.registerTask('build', ['less', 'concat', 'uglify', 'usebanner', 'cssmin']); | ||
//Watch src build | ||
grunt.registerTask('watchsrc', ['watch:src']); | ||
|
||
}; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.