Skip to content

Instantly share code, notes, and snippets.

@KidkArolis
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KidkArolis/f02b859842ac90fd6320 to your computer and use it in GitHub Desktop.
Save KidkArolis/f02b859842ac90fd6320 to your computer and use it in GitHub Desktop.
bower rave

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 <karolis.n@gmail.com>"
],
"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;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment