To get this going
bower install
npm install -g serv
serv
open http://localhost:8000
It logs
Module {} index.js:3
Module {} index.js:4
Module {} index.js:5
Module {} index.js:7
Module {} index.js:8
{ | |
"name": "bower-test", | |
"version": "0.0.0", | |
"authors": [ | |
"Karolis Narkevicius <[email protected]>" | |
], | |
"license": "MIT", | |
"ignore": [ | |
"**/.*", | |
"node_modules", | |
"bower_components", | |
"test", | |
"tests" | |
], | |
"moduleType": [ | |
"amd" | |
], | |
"main": "index", | |
"dependencies": { | |
"json3": "~3.3.1", | |
"jquery": "~2.1.1", | |
"underscore": "~1.6.0", | |
"modernizr": "~2.8.2", | |
"moment": "~2.7.0", | |
"fastclick": "~1.0.2", | |
"rave": "~0.1.3" | |
} | |
} |
<!doctype html> | |
<html data-rave-meta="bower.json" data-debug> | |
<head> | |
<script src="bower_components/rave/rave.js" async></script> | |
</head> | |
</html> |
define(function (require, exports) { | |
console.log(require("json3")); | |
console.log(require("jquery")); | |
console.log(require("underscore")); | |
// This works only with the #bower-no-more-package-json branch | |
// console.log(require("modernizr")); | |
console.log(require("moment")); | |
console.log(require("fastclick")); | |
exports.main = function (context) { | |
write('<h1>Welcome to RaveJS!</h1>'); | |
write('<h2>Congrats on your first RaveJS app: "' + context.app.name + '"!</h2>'); | |
}; | |
function write (msg) { | |
document.body.appendChild(document.createElement('div')).innerHTML = msg; | |
} | |
}); |