Comparing version 0.2.1 to 0.3.0
@@ -60,3 +60,3 @@ // Generated by CoffeeScript 1.3.3 | ||
var lib_index, tryNextLib, try_exts; | ||
try_exts = [""].concat(Object.keys(extensions)); | ||
try_exts = Object.keys(extensions); | ||
lib_index = 0; | ||
@@ -63,0 +63,0 @@ tryNextLib = function() { |
{ | ||
"name": "jspackage", | ||
"description": "build tool which adds client-side import syntax", | ||
"version": "0.2.1", | ||
"version": "0.3.0", | ||
"author": { | ||
@@ -31,5 +31,5 @@ "name": "Andrew Kelley", | ||
"bin": { | ||
"jspackage": "./cmd_wrapper.js" | ||
"jspackage": "./bin/jspackage" | ||
}, | ||
"main": "jspackage.js" | ||
} |
@@ -22,5 +22,4 @@ Client side build tool with dependency management | ||
* File extensions are optional and will be automatically resolved if not | ||
included. | ||
- In fact it is recommended to never use file extensions when importing. | ||
* File extensions are automatically resolved. Do not include file extensions | ||
in your import statements. | ||
* Files will only be included once in the resulting code, regardless of how | ||
@@ -35,2 +34,3 @@ many times a file is imported. | ||
they change. | ||
* Ability to supply more source code search paths with --lib. | ||
@@ -43,8 +43,9 @@ ## Command line usage | ||
``` | ||
Usage: jspackage input_file [output_file] [options] | ||
Usage: jspackage input_file output_file [options] | ||
Available options: | ||
-h, --help shows this help section | ||
-b, --bare compile without a top-level function wrapper | ||
-w, --watch watch source files and recompile when any change | ||
-h, --help shows this help section | ||
-b, --bare compile without a top-level function wrapper | ||
-w, --watch watch source files and recompile when any change | ||
-l, --lib PATH add an additional search directory for source files | ||
``` | ||
@@ -59,10 +60,10 @@ | ||
server = http.createServer (req, res) -> | ||
res.writeHead(200) | ||
compile 'mainfile', (err, compiled_code) -> | ||
if err | ||
res.end 'throw unescape("' + escape(err.toString()) + '");' | ||
else | ||
res.end compiled_code | ||
res.writeHead(200) | ||
compile {mainfile}, (err, compiled_code) -> | ||
if err | ||
res.end 'throw unescape("' + escape(err.toString()) + '");' | ||
else | ||
res.end compiled_code | ||
server.listen(8080) | ||
@@ -69,0 +70,0 @@ ``` |
@@ -38,3 +38,3 @@ // Generated by CoffeeScript 1.3.3 | ||
var cmdline; | ||
cmdline = "node ./cmd.js " + switches + " " + main_file + " " + tmp_js_file.path; | ||
cmdline = "bin/jspackage " + switches + " " + main_file + " " + tmp_js_file.path; | ||
return exec(cmdline, function(err, stdout, stderr) { | ||
@@ -41,0 +41,0 @@ if (stderr.length > 0) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
30106
101
496