From 1feb209c2486ff3dd3ebb84dccd4f300d1c31ed6 Mon Sep 17 00:00:00 2001 From: Tyler Renelle Date: Sun, 19 May 2013 18:01:01 +0100 Subject: [PATCH] Moving back to the Browserify method of concat'd JS files, which will then be exposed to the browser as a global. This was decided between @yangit and me, as we found RequireJS to be too painful to setup for our use case. This Browserify + Global works just fine for us, and it fits perfectly as require() statements in our node.js backend --- Makefile | 2 + README.md | 7 +- index.js | 8 + package.json | 11 +- script/items.coffee | 109 +++++++++++ script/items.js | 453 -------------------------------------------- script/moment.js | 6 - 7 files changed, 130 insertions(+), 466 deletions(-) create mode 100644 Makefile create mode 100644 index.js create mode 100644 script/items.coffee delete mode 100644 script/items.js delete mode 100644 script/moment.js diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000..a79bb4ce61 --- /dev/null +++ b/Makefile @@ -0,0 +1,2 @@ +compile: + ./node_modules/browserify/bin/cmd.js index.js > index-browser.js \ No newline at end of file diff --git a/README.md b/README.md index 37fda89096..268859e4de 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,10 @@ Shared resources useful for the multiple HabitRPG repositories, that way all the * Algorithms - level up algorithm, scoring functions, etc * Item definitions - weapons, armor, pets -You only need to include algos.coffee -It will include the rest as necessary. - +##Browserify Usage (TODO fix up this documentation to use old browserify setup) +The `Makefile` runs Browserify to compile `index-browser.js`, which you include in a `