Skip to content

Commit

Permalink
Updates to Jakefile, pull indent, formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
rwaldron committed Sep 23, 2011
1 parent a246009 commit 3380fb5
Showing 1 changed file with 73 additions and 73 deletions.
146 changes: 73 additions & 73 deletions Jakefile.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,72 +9,72 @@
*/

var // Dependency References
fs = require( "fs" ),
_ = require( "underscore" ),
jshint = require( "jshint" ).JSHINT,
colors = require( "colors" ),
uglifyjs = require( "uglify-js" ),
Buffer = require( "buffer" ).Buffer,
zlib = require( "zlib" ),
dateFormat = require( "dateformat" );
fs = require( "fs" ),
_ = require( "underscore" ),
jshint = require( "jshint" ).JSHINT,
colors = require( "colors" ),
uglifyjs = require( "uglify-js" ),
Buffer = require( "buffer" ).Buffer,
zlib = require( "zlib" ),
dateFormat = require( "dateformat" );

var // Shortcut References
slice = Array.prototype.slice,
now = new Date();
slice = Array.prototype.slice,
now = new Date();

var // Program References
$$ = {},
// Get options, defaults merged with build.json file.
config = _.extend({}, true, {
$$ = {},
// Get options, defaults merged with build.json file.
config = _.extend({}, true, {

// Meta Build Info
"meta": {
"buildDate": dateFormat( now, "m/d/yyyy" )
},

// Overridden with build.json
"files": {},

// License Banner Template
"banner": [
"// <%= label %> - v<%= version %> - <%= buildDate %>",
"// <%= homeurl %>",
"// <%= copyright %>; Licensed <%= license.join(', ') %>"
].join( "\n" ),

// JSHint Optional Settings
"jshint": {
unused: true,
unuseds: true,
devel: true,
undef: true,
noempty: true,
evil: true,
forin: false,
maxerr: 100
// "curly": true,
// "eqnull": true,
// "immed": true,
// "newcap": true,
// "noarg": true,
// "undef": true,
// "browser": true,
// "predef": [ "jQuery" ]
},
// Meta Build Info
"meta": {
"buildDate": dateFormat( now, "m/d/yyyy" )
},

// Uglify Optional Settings
"uglify": {
"mangle": {
"except": [ "$" ]
},
"squeeze": {},
"codegen": {}
}
// Overridden with build.json
"files": {},

// License Banner Template
"banner": [
"// <%= label %> - v<%= version %> - <%= buildDate %>",
"// <%= homeurl %>",
"// <%= copyright %>; Licensed <%= license.join(', ') %>"
].join( "\n" ),

// JSHint Optional Settings
"jshint": {
unused: true,
unuseds: true,
devel: true,
undef: true,
noempty: true,
evil: true,
forin: false,
maxerr: 100
// "curly": true,
// "eqnull": true,
// "immed": true,
// "newcap": true,
// "noarg": true,
// "undef": true,
// "browser": true,
// "predef": [ "jQuery" ]
},
readJson( "build.json", true )
),
// Setup Distribution File Banner (License Block)
banner = _.template( typeof config.banner == "string" ? config.banner : "" );

// Uglify Optional Settings
"uglify": {
"mangle": {
"except": [ "$" ]
},
"squeeze": {},
"codegen": {}
}
},
readJson( "build.json", true )
),
// Setup Distribution File Banner (License Block)
banner = _.template( typeof config.banner == "string" ? config.banner : "" );

// Logging Utility Functions
function header( msg ) {
Expand Down Expand Up @@ -177,8 +177,8 @@ function uglify( src ) {
write( "Uglifying..." );

var jsp = uglifyjs.parser,
pro = uglifyjs.uglify,
ast;
pro = uglifyjs.uglify,
ast;

try {
ast = jsp.parse( src );
Expand Down Expand Up @@ -217,17 +217,17 @@ task( "hint", function() {
_.keys( config.files).forEach(function( minpath ) {

var files = config.files[ minpath ],
concat = files.src.map(function( path ) {
var src = readFile( path );
concat = files.src.map(function( path ) {
var src = readFile( path );

config.jshint.devel = config.jshint.debug = files.debug;
config.jshint.devel = config.jshint.debug = files.debug;

if ( file.prehint ) {
hint( src );
}
if ( file.prehint ) {
hint( src );
}

return src;
}).join( "\n" );
return src;
}).join( "\n" );

if ( files.src.length > 1 ) {
write( "Concatenating " + files.src.length + " scripts..." );
Expand All @@ -247,11 +247,11 @@ task( "min", function() {
_.keys( config.files ).forEach(function( minpath ) {

var file = config.files[ minpath ],
concat = file.src.map( function( path ) {
return readFile( path );
}).join( "\n" ),
concat = file.src.map( function( path ) {
return readFile( path );
}).join( "\n" ),

intro, min;
intro, min;

// Generate intro block with banner template,
// Inject meta build data
Expand Down

0 comments on commit 3380fb5

Please sign in to comment.