Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Precompile CoffeeScript and published JavaScript files.

  • Loading branch information...
commit 864d6c82e77fbfe0e0cc30f04023d902d9053575 1 parent a1642be
@assaf authored
View
1  .gitignore
@@ -2,3 +2,4 @@ docs
html
man7
node_modules
+lib/**/*.js
View
6 .npmignore
@@ -0,0 +1,6 @@
+npm-debug.log
+node_modules
+lib/**/*.coffee
+Makefile
+html
+test
View
26 Makefile
@@ -1,17 +1,26 @@
default : test
-.PHONY : test setup
+.PHONY : build clean publish setup test
# Setup everything
setup :
npm install
-
# Run test suite
-test :
+test : setup
npm test
+# Remove temporary files
+clean :
+ rm -rf html man7
+ rm -f lib/zombie/*.js
+
+# CoffeeScript to JavaScript
+build : clean
+ coffee -b -c -l -o lib/zombie lib/zombie/*.coffee
+
+
# Documentation consists of Markdown files converted to HTML, CSS/images copied over, annotated source code and PDF.
doc : html html/source html/zombie.pdf
@@ -64,11 +73,6 @@ man7/zombie-%.7 : doc/%.md
ronn --roff $< > $@
-# Clean up temporary directories
-clean :
- rm -rf html man7
-
-
# Get version number from package.json, need this for tagging.
version = $(shell node -e "console.log(JSON.parse(require('fs').readFileSync('package.json')).version)")
@@ -78,9 +82,11 @@ publish-docs : html html/source html/zombie.pdf
rsync -chr --del --stats html/ labnotes.org:/var/www/zombie/
# npm publish, public-docs and tag
-publish : clean man7 publish-docs
- git push
+publish : build doc man7
npm publish
+ git push
git tag v$(version)
git push --tags origin master
+ make publish-docs
+ make clean
View
22 TODO.md
@@ -1,22 +0,0 @@
-zombie.js-todo(7) -- Wishlist
-=============================
-
-* CSS support
- * Add `style` attribute, parsed on-demand
- * Add stylesheets to document
- * Add feature to load/parse internal and external stylesheets
- * Add browser option to control CSS loading (similar to `runScripts`)
- * Make sure `DOMContentLoaded` event fires after all stylesheets
- are loaded
-
-* Navigation: Browser.open/close should work as a pair; look into supporting
- window.open; fire unload event when navigating away from page.
-
-* Send unload event when navigating away from page.
-
-* Time and timezone: within window context, new Date() should use browser clock
- and timezone; allow changing browser timezone and default to system's.
-
-* Accessors for window.status.
-
-* Support focus and blur events.
View
9 lib/zombie.js
@@ -1,9 +0,0 @@
-var coffee = require("coffee-script");
-var File = require("fs");
-if (!require.extensions[".coffee"]) {
- require.extensions[".coffee"] = function (module, filename) {
- var source = coffee.compile(File.readFileSync(filename, "utf8"));
- return module._compile(source, filename);
- };
-}
-module.exports = require(__filename.replace(/\.js$/, "/index.coffee"));
View
5 package.json
@@ -13,13 +13,13 @@
"html", "html5", "dom", "css", "javascript", "integration", "ajax", "full-stack", "DSL" ],
"main": "lib/zombie",
"scripts": {
- "test": "./node_modules/.bin/mocha"
+ "prepublish": "make build",
+ "test": "./node_modules/.bin/mocha"
},
"engines": {
"node": ">= 0.6.0"
},
"dependencies": {
- "coffee-script": "~1.3.1",
"eventsource": "~0.0.5",
"htmlparser": "~1.7.6",
"html5": "~0.3.5",
@@ -30,6 +30,7 @@
"ws": "~0.4.14"
},
"devDependencies": {
+ "coffee-script": "~1.3.1",
"docco": "~0.3.0",
"express": "~2.5.9",
"highlight": "~0.2.2",
View
2  test/helpers/index.coffee
@@ -1,5 +1,5 @@
Replay = require("replay")
-Browser = require("../../lib/zombie.js")
+Browser = require("../../lib/zombie")
# Always run in verbose mode on Travis.
Please sign in to comment.
Something went wrong with that request. Please try again.