UNPKG

coffee-toaster

Version:

Minimalist manager and build system for CoffeeScript, an alternative for AMD's or CJS's OOP patterns, but with similar results. Made for those who dare to use class definitions in CoffeeScript while being able to easily inherit from external files. Powered with imports directives that use wildcards facilities, exposed scopes and excluded files filter options. The system can even use folders-as-namespaces to help you avoid naming collisions in architecture.

80 lines (59 loc) 1.38 kB
# Instrospection Check out the [compile.coffee](https://github.com/serpentem/coffee-toaster/blob/master/examples/introspection/compile.coffee) file for different usages. ## Requiring ````ruby Toaster = require( "coffee-toaster" ).Toaster ```` ## Custom config files: ````ruby # PASSSING CONFIG FILE (same as the single-folder example) new Toaster __dirname, {w:true, d:true, "config-file": "config.single.coffee"} ```` Or: ````ruby # PASSSING CONFIG FILE (same as the multi-folder example) new Toaster __dirname, {w:true, d:true, "config-file": "config.multi.coffee"} ```` ## Using JS object: ````ruby # PASSING OBJECT (single) new Toaster __dirname, w:true d:true config: # => SRC FOLDERS AND VENDORS folders: 'src': '' vendors:[] # OPTIONS bare: false packaging: true expose: 'window' minify: false # RELEASING httpfolder: '' release: "www/js/app.js" debug: 'www/js/app-debug.js' ```` ````ruby # PASSING OBJECT (multi) new Toaster __dirname, w:true d:true config: # => SRC FOLDERS AND VENDORS folders: 'src/app': 'app' 'src/artists': 'artists' 'src/genres': 'genres' vendors:[] # OPTIONS bare: false packaging: true expose: 'window' minify: false # RELEASING httpfolder: '' release: "www/js/app.js" debug: 'www/js/app-debug.js' ```` Execute it to test it.