Skip to content

Commit

Permalink
Development commit 1
Browse files Browse the repository at this point in the history
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
bjorn2404 committed May 3, 2014
1 parent 381c368 commit b991276
Show file tree
Hide file tree
Showing 46 changed files with 7,206 additions and 3,207 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules/
cgi-bin/
14 changes: 14 additions & 0 deletions .jshintrc
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
}
117 changes: 117 additions & 0 deletions Gruntfile.js
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']);

};
1 change: 0 additions & 1 deletion css/map-style.css

This file was deleted.

222 changes: 0 additions & 222 deletions css/map.css

This file was deleted.

Loading

0 comments on commit b991276

Please sign in to comment.