Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updated README, added bin section to package.json

  • Loading branch information...
commit 92ce12dee1c4c5b6f00e694ff8ec38b4b1c4a96b 1 parent 782a33d
Daniel Yoder authored
Showing with 15 additions and 27 deletions.
  1. +11 −17 README.md
  2. +4 −1 package.json
  3. +0 −9 src/ark.coffee
View
28 README.md
@@ -2,33 +2,27 @@
Ark allows you package up your browser Javascript using the Node module system. You can use `require` just like in Node. Put another way, you can reuse server-side code in the browser and still use `require` and NPM.
-**Ark is currently under development and is not ready for use.**
+## Installation
+ npm install -g ark
+
## Usage
-To use static analysis to generate a manifest of what will be packaged up:
+Generate a manifest of what will be packaged up:
- ark manifest --static --source cs/lib/web > manifest.txt
+ ark manifest --source cs/lib/web > manifest.json
Then you can package up the manifest like this:
- ark package --uglify < manifest.txt > web/js/web-api.js
+ ark package < manifest.json > web/js/web-api.js
-Or, in one step, without static analysis (just packaging all your source files up):
+Or, in one step:
- ark package --uglify --source cs/lib/web > web/js/web-api.js
-
-Or, automagically picking up and compiling CoffeeScript:
+ ark package --source cs/lib/web > web/js/web-api.js
+
+**Note** You *must* have a `package.json` in your `--source` directory that has a `main` entry point defined.
- ark package --uglify web/js/web-api.js --source cs/src/web > web/js/web-api.js
-
-You *must* have a `package.json` in your `--source` directory that has a `main` entry point defined.
## Status
-**Ark is currently under development and is not ready for use.**
-
-## Installation
-
- npm install -g ark
-
+Ark is currently under development and is not ready for production use.
View
5 package.json
@@ -1,8 +1,11 @@
{
"name": "ark",
- "version": "0.0.1",
+ "version": "0.0.2",
"description": "Packages code for the browser as Node modules.",
"main": "lib/ark.js",
+ "bin": {
+ "ark": "./bin/ark"
+ },
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
View
9 src/ark.coffee
@@ -5,7 +5,6 @@ Path = require "path"
Eco = require "eco"
CoffeeScript = require "coffee-script"
-
inspect = (thing) -> Util.inspect(thing)
error = (message) -> throw new Error(message)
@@ -69,14 +68,6 @@ build_index = (manifest) ->
data = read(resolve(path))
reference = md5(data)
- # TODO: hash compiled source (to avoid storing
- # CoffeeScript source and compiled files)
-
- # TODO: support multiple source formats
-
- # TODO: render actual functions
- # (see render_function above)
-
content[reference] = base64(data)
tmp[file_part] =
Please sign in to comment.
Something went wrong with that request. Please try again.