Permalink
Browse files

delete generated files from repository; build into lib/

  • Loading branch information...
1 parent d5fa8f3 commit 787ecc631e9b1549bb6e1fef52f72b5585ffbbf5 @andrewrk committed Jul 11, 2012
Showing with 11 additions and 539 deletions.
  1. +1 −0 .gitignore
  2. +4 −0 .npmignore
  3. +1 −1 bin/jspackage
  4. +0 −79 cmd.js
  5. +0 −344 jspackage.js
  6. +5 −4 package.json
  7. +0 −111 test.js
View
@@ -1 +1,2 @@
node_modules/
+lib/
View
@@ -0,0 +1,4 @@
+node_modules/
+src/
+tests/
+readme.md
View
@@ -3,5 +3,5 @@
var path = require('path');
var fs = require('fs');
var bin_dir = path.dirname(fs.realpathSync(__filename));
-var cmd_path = path.resolve(bin_dir, "..", "cmd.js");
+var cmd_path = path.resolve(bin_dir, "..", "lib", "cmd.js");
require(cmd_path);
View
@@ -1,79 +0,0 @@
-// Generated by CoffeeScript 1.3.3
-var compile, ext, fs, options, optparse, output, parser, path, printUsage, switches, without_ext;
-
-compile = require('./jspackage').compile;
-
-fs = require('fs');
-
-path = require('path');
-
-optparse = require('optparse');
-
-switches = [['-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"]];
-
-parser = new optparse.OptionParser(switches);
-
-printUsage = function() {
- parser.banner = "Usage: jspackage input_file output_file [options]";
- return console.log(parser.toString());
-};
-
-parser.on('help', function() {
- printUsage();
- return process.exit(1);
-});
-
-options = {};
-
-parser.on(0, function(arg) {
- return options.mainfile = arg;
-});
-
-output = null;
-
-parser.on(1, function(arg) {
- return output = arg;
-});
-
-parser.on("bare", function() {
- return options.bare = true;
-});
-
-parser.on("watch", function() {
- return options.watch = true;
-});
-
-parser.on("lib", function(name, value) {
- var _ref;
- return ((_ref = options.libs) != null ? _ref : options.libs = []).push(value);
-});
-
-parser.parse(process.argv.splice(2));
-
-if (!options.mainfile || !output) {
- printUsage();
- process.exit(1);
-}
-
-if ((ext = path.extname(options.mainfile)).length > 0) {
- without_ext = options.mainfile.substring(0, options.mainfile.length - ext.length);
- options.mainfile = without_ext;
-}
-
-compile(options, function(err, code) {
- var timestamp;
- if (options.watch) {
- timestamp = (new Date()).toLocaleTimeString();
- if (err) {
- return console.error("" + timestamp + " - error: " + err);
- } else {
- console.info("" + timestamp + " - generated " + output);
- return fs.writeFile(output, code);
- }
- } else {
- if (err) {
- throw err;
- }
- return fs.writeFile(output, code);
- }
-});
Oops, something went wrong. Retry.

0 comments on commit 787ecc6

Please sign in to comment.