Permalink
Browse files

Updated grunt and amd fixes

  • Loading branch information...
1 parent c217567 commit b5147c469d88d7ea7ded8c5027e6aea733ec2d98 @doug-martin committed Apr 16, 2013
Showing with 73 additions and 70 deletions.
  1. +55 −0 Gruntfile.js
  2. +2 −2 extender-min.js
  3. +2 −2 extender.js
  4. +0 −56 grunt.js
  5. +14 −10 package.json
View
@@ -0,0 +1,55 @@
+/*global module:false*/
+module.exports = function (grunt) {
+ // Project configuration.
+ grunt.initConfig({
+ pkg: grunt.file.readJSON('package.json'),
+
+ jshint: {
+ file: "./index.js",
+ options: {
+ jshintrc: '.jshintrc'
+ }
+ },
+
+ lint: {
+ files: [
+ 'array.js'
+ ]
+ },
+
+ it: {
+ all: {
+ src: 'test/**/*.test.js',
+ options: {
+ timeout: 3000, // not fully supported yet
+ reporter: 'dotmatrix'
+ }
+ }
+ },
+ watch: {
+ files: '<config:lint.files>',
+ tasks: 'lint it'
+ },
+ uglify: {
+ options: {
+ banner: '/*! <%= 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 %>;' +
+ ' Licensed <%= pkg.license %> */\n'
+ },
+ min: {
+ files: {
+ '<%= pkg.name %>-min.js': ['extender.js']
+ }
+ }
+ }
+ });
+
+ // Default task.
+ grunt.registerTask('default', ['jshint', 'it', 'uglify:min']);
+ grunt.loadNpmTasks('grunt-it');
+ grunt.loadNpmTasks('grunt-contrib-jshint');
+ grunt.loadNpmTasks('grunt-contrib-uglify');
+
+};
View
Oops, something went wrong.
View
@@ -530,8 +530,8 @@
}
} else if ("function" === typeof define) {
- define(["require"], function (require) {
- return defineExtender((require("declare.js")));
+ define(["declare"], function (declare) {
+ return defineExtender(declare);
});
} else {
this.extender = defineExtender(this.declare);
View
@@ -1,56 +0,0 @@
-/*global module:false*/
-module.exports = function (grunt) {
- var fs = require('fs');
-
- // grunt doesn't natively support reading config from .jshintrc yet
- var jshintOptions = JSON.parse(fs.readFileSync('./.jshintrc'));
-
- // Project configuration.
- grunt.initConfig({
- pkg: '<json:package.json>',
- meta: {
- 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 %>;' +
- ' Licensed <%= pkg.license %> */'
- },
-
- jshint: {
- options: jshintOptions,
- globals: jshintOptions.predef
- },
-
- lint: {
- files: [
- 'extender.js'
- ]
- },
-
- it: {
- all: {
- src: 'test/**/*.test.js',
- options: {
- timeout: 3000, // not fully supported yet
- reporter: 'dotmatrix'
- }
- }
- },
- min: {
- dist: {
- src: ['<banner:meta.banner>', 'extender.js'],
- dest: '<%= pkg.name %>-min.js'
- }
- },
- watch: {
- files: '<config:lint.files>',
- tasks: 'lint it'
- },
- uglify: {}
- });
-
- // Default task.
- grunt.registerTask('default', 'lint it min');
- grunt.loadNpmTasks('grunt-it');
-
-};
View
@@ -1,6 +1,6 @@
{
"name": "extender",
- "version": "0.0.6",
+ "version": "0.0.7",
"description": "Easily create object decorators!",
"main": "index.js",
"scripts": {
@@ -21,19 +21,23 @@
"license": "MIT",
"testling": {
"files": "test/browserling.js",
- "browsers": {
- "ie": [6, 7, 8, 9],
- "chrome": [4, 23, "canary"],
- "firefox": [3, 3.5, 3.6, 4, 17, "nightly"],
- "opera": [10, 10.5, 11, 11.5, 11.6, 12, "next"],
- "safari": ["5.0.1", 5.1]
- }
+ "browsers": [
+ "ie/6..latest",
+ "chrome/20..latest",
+ "firefox/14..latest",
+ "safari/latest",
+ "iphone/6",
+ "ipad/6"
+ ]
},
"dependencies": {
- "declare.js": "~0.0.4"
+ "declare.js": "~0.0.4",
+ "grunt": "~0.4.1"
},
"devDependencies": {
"it": "~0.2.0",
- "grunt-it": "~0.2.0"
+ "grunt-it": "~0.3.0",
+ "grunt-contrib-uglify": "~0.2.0",
+ "grunt-contrib-jshint": "~0.4.3"
}
}

0 comments on commit b5147c4

Please sign in to comment.