Created
December 15, 2011 22:49
-
-
Save floriankugler/1483323 to your computer and use it in GitHub Desktop.
garcon build definition
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// buildfile.js ----------------------------------------- | |
var garcon = require('garcon'); | |
var SproutCore = require('frameworks/sproutcore/buildfile'); | |
module.exports = MyProject; | |
var MyProject = garcon.Project.extend({ | |
listenOnPort: 8000, | |
children: 'sc myCore myApp'.w(), | |
sc: SproutCore, | |
myCore: garcon.Framework.extend({ | |
path: 'frameworks/my_core' | |
}), | |
myApp: garcon.App.extend({ | |
path: 'apps/my_app' | |
}) | |
}); | |
// sc buildfile ------------------------------------------------- | |
var garcon = require('garcon'); | |
module.exports = SproutCore; | |
var SproutCore = garcon.Framework.extend({ | |
development: Target.extend({ | |
children: 'bootstrap runtime foundation desktop datastore testing'.w() | |
}), | |
production: Target.extend({ | |
children: 'bootstrap runtime foundation desktop datastore'.w(), | |
stylesheets: CombinedAndMinifiedStylesheet, | |
scripts: CombinedAndMinifiedScript | |
}), | |
bootstrap: garcon.Framework.extend({ | |
path: 'frameworks/bootstrap' | |
}), | |
runtime: garcon.Framework.extend({ | |
path: 'frameworks/runtime' | |
}), | |
foundation: garcon.Framework.extend({ | |
path: 'frameworks/foundation' | |
}), | |
desktop: garcon.Framework.extend({ | |
path: 'frameworks/desktop' | |
}), | |
datastore: garcon.Framework.extend({ | |
path: 'frameworks/datastore' | |
}) | |
}); | |
// default definitions ------------------------------------------------------------------- | |
module.exports.Project = Project; | |
module.exports.App = App; | |
module.exports.Framework = Framework; | |
module.exports.File = File; | |
var Resource = FileType.extend({ | |
contentTypes: { png: 'image/png', gif: 'image/gif', jpg: 'image/jpg' } | |
}); | |
var Stylesheet = FileType.extend({ | |
contentTypes: { css: 'text/css; charset=utf-8', styl: 'text/css; charset=utf-8' }, | |
outputExtension: 'css' | |
}); | |
var ProcessedStylesheet = Stylesheet.extend({ | |
handlers: 'sc_static stylus'.w() | |
}); | |
var CombinedAndMinifiedStylesheet = Stylesheet.extend({ | |
handlers: 'combine minify'.w() | |
}); | |
var Script = FileType.extend({ | |
contentTypes: { js: 'text/javascript; charset=utf-8' } | |
}); | |
var CombinedAndMinifiedScript = Script.extend({ | |
handlers: 'combine minify'.w() | |
}); | |
var Project = BuildTreeNode.extend({ | |
listenOnPort: 8000 | |
}); | |
var Framework = BuildTreeNode.extend({ | |
development: Target.extend({ | |
excludePaths: 'protocols'.w() | |
}), | |
production: Target.extend({ | |
excludePaths: 'protocols tests'.w(), | |
stylesheets: CombinedAndMinifiedStylesheet, | |
scripts: CombinedAndMinifiedScript | |
}) | |
}); | |
var App = Framework; | |
var File = BuildTreeNode.extend({ | |
stylesheet: ProcessedStylesheet, | |
script: Script, | |
resource: Resource | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment