doSomethingAwesome()
<script type="text/javascript" src="main.js"></script>
<script type="text/javascript" src="somelib.js"></script>
module.exports = someObjectOrFunction
var something = require('./something.js')
require('./somefile.js')
require('somemodule')
Suggestion #2
Use a routing library to kick off individual pages
var LocationBar = require('location-bar')
, navigation = new LocationBar()
, Index = require('./index')
, Cats = require('./cats')
navigation.match(/^$/, function() {
changeToView(Index)
})
navigation.match(/^cats%/, function() {
changeToView(Cats)
})
/views
cats.html ponies.html unicorns.html /controllers cats.js ponies.js unicorns.js /models cats.js ponies.js unicorns.js
/ponies index.js pony.js template.html /unicorns index.js unicorn.js template.jsx /cats index.js
CSS = $(wildcard "widgets/*.css")
app/style.css: $(CSS)
cat $(CSS) > app/style.css
npm install anicelibrary --save
npm > Checking for package npm > LOL DOWNLOADING THE WHOLE INTERNET NOW
npm > STILL DOWNLOADING
npm > LOL
var React = require('react')
, Widget = require('./lib/widget.jsx')
module.exports = function(element, cfg) {
React.renderComponent(Widget(cfg), element)
}