Skip to content
This repository has been archived by the owner on May 8, 2021. It is now read-only.

Commit

Permalink
removed predefined module name for AMD
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholascloud committed Feb 18, 2013
1 parent 1ca1dfa commit ae6ca0a
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 11 deletions.
20 changes: 14 additions & 6 deletions Jakefile.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,35 @@
/*global jake, desc, task, directory, file*/
/*global jake, desc, task, directory, file, complete*/
'use strict';
var pkg = require('./package.json'),
path = require('path'),
fs = require('fs'),
os = require('os'),
async = require('async');
async = require('async'),
rimraf = require('rimraf');

var ROOT_DIR = __dirname,
BUILD_DIR = path.join(ROOT_DIR, 'build'),
TEST_DIR = path.join(ROOT_DIR, 'test');

namespace('package', function () {
desc('gets the project version from package.json');
// gets the project version from package.json
task('version', function () {
return pkg.version;
});
});

desc('creates the build directory');
// creates the build directory
directory(BUILD_DIR);

desc('builds l33teral');
task('build', [BUILD_DIR], function () {
desc('cleans previous builds');
task('clean', function () {
rimraf(BUILD_DIR, function (err) {
complete();
});
}, {async: true});

desc('builds project');
task('build', ['clean', BUILD_DIR], function () {
console.log('@@ ROOT_DIR', ROOT_DIR);
console.log('@@ BUILD_DIR', BUILD_DIR);

Expand Down
3 changes: 2 additions & 1 deletion build/l33teral-0.7.0.js → build/l33teral-0.7.1.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
* IN THE SOFTWARE.
*/
/*global module, require, define*/
'use strict';
(function (global, factory) {

Expand All @@ -36,7 +37,7 @@

// AMD module
if (typeof define === 'function' && define.amd) {
return define('l33teral', ['underscore'], function (_) {
return define(['underscore'], function (_) {
return factory(_, global);
});
}
Expand Down
3 changes: 2 additions & 1 deletion l33teral.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/*global module, require, define*/
'use strict';
(function (global, factory) {

Expand All @@ -11,7 +12,7 @@

// AMD module
if (typeof define === 'function' && define.amd) {
return define('l33teral', ['underscore'], function (_) {
return define(['underscore'], function (_) {
return factory(_, global);
});
}
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "l33teral",
"version": "0.7.0",
"version": "0.7.1",
"author": "Nicholas Cloud",
"description": "functions to help deal with object literals",
"keywords": ["literals", "objects", "utilities"],
Expand All @@ -13,9 +13,10 @@
"mocha": "1.8.1",
"chai": "1.4.2",
"underscore": "1.4.3",
"clone": "0.1.5"
"clone": "0.1.5",
"rimraf": "2.1.4"
},
"main": "./build/l33teral-0.7.0",
"main": "./build/l33teral-0.7.1",
"scripts": {
"test": "jake test --trace",
"prepublish": "jake build"
Expand Down

0 comments on commit ae6ca0a

Please sign in to comment.