Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added grunt build process

  • Loading branch information...
commit 8579ecebc97b3d3be68aaa205b4d2535c150d805 1 parent 4cb7268
@derickbailey authored
Showing with 77 additions and 0 deletions.
  1. +68 −0 grunt.js
  2. +9 −0 src/amd.js
View
68 grunt.js
@@ -0,0 +1,68 @@
+/*global module:false*/
+module.exports = function(grunt) {
+
+ grunt.loadNpmTasks('grunt-rigger');
+
+ // Project configuration.
+ grunt.initConfig({
+ meta: {
+ version: '0.0.1',
+ banner: '// Backbone.Picky, v<%= meta.version %>\n' +
+ '// Copyright (c)<%= grunt.template.today("yyyy") %> Derick Bailey, Muted Solutions, LLC.\n' +
+ '// Distributed under MIT license\n' +
+ '// http://github.com/derickbailey/backbone.picky'
+ },
+
+ lint: {
+ files: ['src/backbone.picky.js']
+ },
+
+ rig: {
+ build: {
+ src: ['<banner:meta.banner>', 'src/backbone.picky.js'],
+ dest: 'lib/backbone.picky.js'
+ },
+ amd: {
+ src: ['<banner:meta.banner>', 'src/amd.js'],
+ dest: 'lib/amd/backbone.picky.js'
+ }
+ },
+
+ min: {
+ standard: {
+ src: ['<banner:meta.banner>', '<config:rig.build.dest>'],
+ dest: 'lib/backbone.picky.min.js'
+ },
+ amd: {
+ src: ['<banner:meta.banner>', '<config:rig.amd.dest>'],
+ dest: 'lib/amd/backbone.picky.min.js'
+ }
+ },
+
+ jshint: {
+ options: {
+ curly: true,
+ eqeqeq: true,
+ immed: false,
+ latedef: true,
+ newcap: true,
+ noarg: true,
+ sub: true,
+ undef: true,
+ boss: true,
+ eqnull: true,
+ browser: true
+ },
+ globals: {
+ jQuery: true,
+ Backbone: true,
+ _: true
+ }
+ },
+ uglify: {}
+ });
+
+ // Default task.
+ grunt.registerTask('default', 'lint rig min');
+
+};
View
9 src/amd.js
@@ -0,0 +1,9 @@
+(function (root, factory) {
+ if (typeof define === 'function' && define.amd) {
+ // AMD. Register as an anonymous module.
+ define(["_", "jQuery","Backbone"], factory);
+ }
+}(this, function (_, jQuery, Backbone) {
+ //= backbone.syphon.js
+ return Backbone.Syphon;
+}));
Please sign in to comment.
Something went wrong with that request. Please try again.