From 13be11f25d6837bcd8e6cf7ac433841760e08b8f Mon Sep 17 00:00:00 2001 From: Joel Fillmore Date: Tue, 23 Sep 2014 00:15:41 -0700 Subject: [PATCH] Project template --- .gitattributes | 13 ++++++++++ .gitignore | 3 +++ README.md | 13 ++++++++++ gruntfile.js | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++ package.json | 24 ++++++++++++++++++ 5 files changed, 120 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 README.md create mode 100644 gruntfile.js create mode 100644 package.json diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..2fa33b3 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,13 @@ +# Set default behaviour, in case users don't have core.autocrlf set. +* text=auto + +# Explicitly declare text files we want to always be normalized and converted +# to native line endings on checkout. +*.js text +*.less text +*.html text + +# Denote all files that are truly binary and should not be modified. +*.png binary +*.jpg binary +*.gif binary \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..940d194 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.sublime-* +PxMap*.js +node_modules \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..92f03ff --- /dev/null +++ b/README.md @@ -0,0 +1,13 @@ +# PxMap + +--- + +### The MIT License + +Copyright (c) 2014 Pixel Lab + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/gruntfile.js b/gruntfile.js new file mode 100644 index 0000000..8bc784a --- /dev/null +++ b/gruntfile.js @@ -0,0 +1,67 @@ +/*global module:false*/ +module.exports = function(grunt) { + + var BANNER_TEMPLATE = '/*! <%= pkg.title %> | <%= pkg.homepage %> | <%= grunt.template.today("yyyy-mm-dd") %> */\n'; + + // Project configuration. + grunt.initConfig({ + pkg: grunt.file.readJSON('package.json'), + concat: { + options: { + banner: BANNER_TEMPLATE + }, + dist: { + src: [ + + ], + dest: '<%= pkg.name %>.js' + } + }, + jshint: { + files: [ 'gruntfile.js', 'js/*.js' ], + options: { + curly: true, + eqeqeq: true, + immed: true, + latedef: true, + newcap: true, + noarg: true, + sub: true, + undef: true, + boss: true, + eqnull: true, + browser: true, + globals: { + jQuery: true, + PxTouch: true, + console: true + } + } + }, + watch: { + cj: { + files: ['<%= jshint.files %>'], + tasks: ['jshint', 'concat', 'copy', 'uglfiy'] + } + }, + uglify: { + options: { + banner: BANNER_TEMPLATE + }, + dist: { + src: ['<%= concat.dist.dest %>'], + dest: '<%= pkg.name %>.min.js' + } + } + }); + + grunt.loadNpmTasks('grunt-contrib-uglify'); + grunt.loadNpmTasks('grunt-contrib-jshint'); + grunt.loadNpmTasks('grunt-contrib-watch'); + grunt.loadNpmTasks('grunt-contrib-concat'); + grunt.loadNpmTasks('grunt-contrib-copy'); + grunt.loadNpmTasks('grunt-contrib-clean'); + + grunt.registerTask('default', ['jshint', 'concat', 'uglify']); + +}; diff --git a/package.json b/package.json new file mode 100644 index 0000000..d85085b --- /dev/null +++ b/package.json @@ -0,0 +1,24 @@ +{ + "name": "pxmap", + "title": "PxMap", + "homepage": "http://github.com/thinkpixellab/PxMap", + "author": { + "name": "Pixel Lab", + "url": "http://thinkpixellab.com" + }, + "repository": { + "type": "git", + "url": "http://github.com/thinkpixellab/PxMap.git" + }, + "dependencies": { + "grunt": "~0.4.1", + "grunt-contrib-clean": "^0.4.1", + "grunt-contrib-concat": "^0.1.3", + "grunt-contrib-copy": "^0.4.1", + "grunt-contrib-jshint": "^0.2.0", + "grunt-contrib-uglify": "^0.1.2", + "grunt-contrib-watch": "^0.3.1" + }, + "devDependencies": {}, + "keywords": [] +}