Compare commits

..

195 Commits

Author SHA1 Message Date
Jared Allard 82a6e8f1c7 merge: master browserify 2016-01-22 12:49:55 -08:00
Jared Allard 7641afa5a4 test: express test 2016-01-22 12:36:39 -08:00
Jared Allard 34210a3bd6 merge: manually merge master commits 2016-01-22 12:35:41 -08:00
Jared Allard 6ce224d6e4 browserify: implement error checks, path checks, and support express 2016-01-22 12:26:26 -08:00
Jared Allard 53a9c5a210 breaking changes notification 2015-11-30 13:24:11 -08:00
Jared Allard 727f081e87 Merge pull request #149 from jamiechard/master
Make checkThatExecutableExists backwards compatible
2015-11-12 14:35:49 -08:00
Jamie Chard 907be00fdc Make checkThatExecutableExists backwards compatible 2015-11-12 15:56:29 +11:00
Jared Allard 14d1ec38d1 Merge pull request #147 from jackdoe/master
add nodeConfigureArgs and nodeMakeArgs from package.json
2015-11-05 08:39:31 -08:00
borislav nikolov de531ba750 add nodeConfigureArgs and nodeMakeArgs from package.json
example:

        "runtime": {
            "framework": "nodejs",
            "version": "5.0.0",
            "ignoreFlags": true,
            "nodeConfigureArgs": ["--fully-static"],
            "nodeMakeArgs": ["-j","4"]
        }

there is no check if those flags change, which means
if they are changed you must rm -rf the temp directory

will probably push a commit that writes a checksum of them
in the node temp directory so it knows when it is invalid
2015-11-05 15:13:58 +01:00
Jared Allard a497851a74 Merge pull request #143 from vilic/master
proxy browserResolve, fix `child_process.fork` results in bad option, efforts on commander.js compatibility.
2015-10-23 16:40:24 -07:00
vilicvane 915181d0b0 Do not change --child_process path if it's absolute 2015-10-23 12:21:41 +08:00
vilicvane 002727e10f proxy browserResolve for better compatibility; fix node bad option error; change process.argv[1] to current module path for commander.js compatibility. 2015-10-22 14:45:30 +08:00
Jared Allard a9aa1f81fa Merge pull request #142 from vilic/patch-1
Fix a bug caused by last line being a `//` comment
2015-10-21 17:59:40 -07:00
vilicvane 16139e1dc7 Fix a bug caused by last line being a // comment
Such as `//# sourceMappingURL=...`.
2015-10-21 17:59:38 +08:00
Jared Allard 2bc181f2ab Merge pull request #139 from jaredallard/master
merge with master
2015-09-28 16:36:40 -07:00
Jared Allard 4c80d88013 Merge pull request #136 from 1j01/handle-build-failure
Handle build failure
2015-09-16 10:25:35 -07:00
Isaiah Odhner 36094e8d47 Handle build failure 2015-09-16 09:38:49 -04:00
Jared Allard af42599a15 use browserify cli to do this... 2015-08-19 15:59:26 -07:00
Jared Allard 78ca929350 fix insertGlobalVars 2015-08-19 15:48:22 -07:00
Jared Allard 024b9f8cb3 even more fixes
insertGlobalVars
2015-08-19 15:45:42 -07:00
Jared Allard 312a63a0b6 no wait, theirs more
insertGlobal vars, per the browserify --node  source.
2015-08-19 15:42:17 -07:00
Jared Allard 995e03eeea use the correct opts for browserify 2015-08-19 15:36:18 -07:00
Jared Allard b803ae7ddd yes, we do need that replace
fixed issues with building due to non ASCII chars.
2015-08-19 15:32:25 -07:00
Jared Allard d2e954b5ab emit error 2015-08-19 15:29:08 -07:00
Jared Allard ec421204d0 doesn't seem to work on *nix.. ? 2015-08-19 15:28:23 -07:00
Jared Allard 292063c482 remove examples, base of browserify 2015-08-19 14:59:12 -07:00
Jared Allard a0a82e9547 prepare for next version (incase of merge) 2015-08-19 14:22:30 -07:00
Jared Allard e1b30b86ae minor comsetic logging fix. vbump to v0.4.1 2015-08-09 08:42:18 -07:00
Jared Allard 4c88a01003 fix second run issues with --flag enabled. better error handling 2015-08-09 08:32:18 -07:00
Jared Allard 5dbd6b4048 package: finally got around to adding contrib 2015-06-29 10:41:16 -07:00
Jared Allard ce6c570c01 retarget 2.3.1 for nexe 2015-06-26 18:36:26 -07:00
Jared Allard 44581eb3d3 readme: note on output. 2015-06-26 18:30:35 -07:00
Jared Allard d4be3712cd exe: fixes #122, implement base nexe package field 2015-06-26 18:27:26 -07:00
Jared Allard 882c838cb5 nexe: vbump / remove devdepends 2015-06-26 15:30:02 -07:00
Jared Allard e6e49bbbd9 changelog: maintainer fix 2015-06-19 21:49:15 -07:00
Jared Allard 0ae40b9a3c manifest: async 0.9.0 => 1.2.1 2015-06-19 21:46:00 -07:00
Jared Allard 879b1598bc readme: author update 2015-06-19 21:43:23 -07:00
Jared Allard 5c40ca30af readme: clairify that all platforms require python 2015-05-31 11:53:07 -07:00
Jared Allard afb143daf4 readme: clairify building requirements. 2015-05-31 11:50:54 -07:00
RainbowDashDC 3dd5a2102f nexe: vbump and dependencies. 2015-05-01 13:29:42 -07:00
Jared Allard 2cfd10261a Merge pull request #114 from shivamadhavan/master
Updated version of dependency builtins to 1.0.1 ( inclusion of console to the built in module list )
2015-04-16 21:11:54 -07:00
Shiva Kumar Madhavan e7c7878675 Updated version of dependency builtins to 1.0.1 ( inclusion of console to the built in module list ) 2015-04-16 17:17:08 +08:00
Craig Jefferds 3b42e4a5e8 Merge pull request #111 from lahdekorpi/patch-1
Fixed typo in README.md
2015-03-30 08:51:44 -07:00
Toni Lähdekorpi c9431fc206 Fixed typo in README.md 2015-03-30 18:51:18 +03:00
Jared Allard dd68923607 Add 'readline' not include rule.
For some reason nexe attempts to include readline, this solves it. readline is a bultin of node as of 10
2015-03-20 22:08:31 -07:00
Jared Allard 8901e4a2fa Update README.md
Fixing a spelling mistake. Ugh.
2015-03-20 10:55:09 -07:00
Jared Allard 38a920be24 Update README to show new feature 2015-03-20 09:26:30 -07:00
Jared Allard ce7a36958f Merge pull request #108 from crcn/iojs
Implement io.js support! And a few fixes
2015-03-20 09:20:39 -07:00
RainbowDashDC b0644f0d62 Fixes #107, implements --framework/-F. Fetchs iojs latest. 2015-03-19 23:50:48 -07:00
RainbowDashDC 4e402bf937 Initial iojs support. 2015-03-16 10:36:39 -07:00
Jared Allard 5a3bbbad3a Add waffle.io board label 2015-03-08 20:49:52 -07:00
Christopher Karper 1d14ca6359 Freshened up all dependencies 2015-02-22 21:32:59 -05:00
Christopher Karper 1114a581ae Updated deps 2015-02-22 15:05:47 -05:00
Christopher Karper 7ab7f986cf Renamed relative to absolute 2015-02-21 19:42:04 -05:00
Christopher Karper 1d09a6b001 Update README.md
Added myself as a maintainer.
2015-02-21 19:35:17 -05:00
Christopher Karper 636268504e This was bothering me... 2015-02-21 19:02:16 -05:00
RainbowDashDC e8dead82bb Update changelog for 0.3.6 and 0.3.7 2015-02-21 01:32:20 -05:00
RainbowDashDC d2d703e9ea Publish new version to hopefully fix #103 2015-02-21 01:16:34 -05:00
Craig Jefferds 09f36c48e0 Update README.md 2015-02-18 14:18:47 -08:00
Craig Jefferds 6e2870e5d0 Update README.md 2015-02-18 14:18:29 -08:00
Jared Allard cd0e5a012c Merge pull request #102 from gitter-badger/gitter-badge
Add a Gitter chat badge to README.md
2015-02-18 13:40:14 -08:00
The Gitter Badger 17fe557afa Added Gitter badge 2015-02-18 19:35:28 +00:00
RainbowDashDC e4a8d86237 Fixes #98 by giving win32 a 100 length progress bar. 2015-02-15 19:38:35 -08:00
Jared Allard 7b3bcac07c Merge pull request #101 from CKarper/master
Lighter weight way to accomplish the exclusion of the sys module
2015-02-15 15:00:05 -08:00
Christopher Karper fb637e0da3 Lighter weight way to accomplish the exclusion of the sys module 2015-02-15 17:51:05 -05:00
Jared Allard 17c506c9cc Merge pull request #100 from CKarper/master
Stub to ignore require('sys')
2015-02-15 12:57:05 -08:00
Christopher Karper 7a25c2bfd9 This handles embedding 'bin' scripts with shebang interpreter directives at the start 2015-02-15 15:02:58 -05:00
Christopher Karper f784c79ca1 Stub to ignore require('sys') 2015-02-15 14:52:40 -05:00
RainbowDashDC bd75617a2a V bump to solve critical error. 2015-02-15 11:10:34 -08:00
RainbowDashDC b7ffb8266a Fixes #99, resolves #97 by warning on missing file. New examples. New log functions 2015-02-15 11:05:24 -08:00
Jared Allard 08b7ad765d Merge pull request #96 from CKarper/patch-1
Support .json extensions in require() resolution
2015-02-15 07:39:13 -08:00
Christopher Karper 3a7eb91d3b Support .json extensions in require() resolution
Embarrassingly simple fix.  Added .json to the list of extensions to search when a require with no extension is found.  

This resolves #57
2015-02-15 00:33:28 -05:00
RainbowDashDC a0017ed3fe Add changelog.md, add resourceFiles to example, MIT-LICENSE.txt => LICENSE.txt 2015-02-14 19:53:30 -08:00
RainbowDashDC d4205a70c3 Version bump 0.3.5, update depends 2015-02-14 09:44:49 -08:00
RainbowDashDC 380b0e9541 Add example, fix outdated examples 2015-02-14 01:57:54 -08:00
RainbowDashDC 86fa69920c Modify readme, implement cross-plat --python <loc> closes #94 2015-02-14 01:50:32 -08:00
Jared Allard 3144ae8d6f Merge pull request #95 from LorenzGardner/master
Make process.argv consistent in the child fork case
2015-02-09 17:46:51 -08:00
Lorenz Gardner 322f432756 Merge branch 'master' of https://github.com/LorenzGardner/nexe 2015-02-09 16:06:29 -06:00
Lorenz Gardner dcf44f7a80 Make process.argv consistent in the child fork cas
(argv.[0] must = the executable)
2015-02-09 16:05:09 -06:00
LorenzGardner 7b68d7bfee Merge pull request #2 from crcn/master
Pull in changes to master
2015-02-09 15:56:29 -06:00
Jared Allard 1684c8fe5d Merge pull request #93 from LorenzGardner/embedFiles
Embed files
2015-01-31 18:56:18 -08:00
Lorenz Gardner 2c132110b9 Add support for embedded files. 2015-01-06 19:05:01 -06:00
Lorenz Gardner cf97acfcdb Make the example code demonstrate forked process and dynamic require 2015-01-05 17:58:57 -06:00
LorenzGardner a1405a3b36 Merge pull request #1 from crcn/master
update
2014-12-30 12:07:37 -06:00
Craig Jefferds 6c844fa5f7 Merge pull request #92 from LorenzGardner/child.fork
Add child_process.fork support.
2014-12-23 19:59:18 -03:00
LorenzGardner a40454a5ae update read me mentioning usage of child_process.fork 2014-12-23 12:16:49 -06:00
Lorenz Gardner 94c5a54d5f Add child_process.fork support. 2014-12-23 12:01:33 -06:00
Craig Jefferds 99e228a145 Merge pull request #88 from LorenzGardner/master
Add support for JSON files, and __dirname
2014-12-19 16:05:25 -08:00
LorenzGardner 564dffe925 clarify workaround for native module support 2014-12-19 14:23:40 -06:00
Lorenz Gardner 7b9f235715 It actually makes way more sense for __driname to be exectuable dir rather
than the cwd.
2014-12-18 18:02:48 -06:00
LorenzGardner e7b28d0aa5 Update README.md
update the readme to explain how to workaround the limitations (not supporting dynamic require statements and lack of native module support the pseudo support of __dirname)
2014-12-18 17:46:55 -06:00
Lorenz Gardner bc37c3ce7b Merge branch 'JSON-Support'
Conflicts:
	lib/bundle.js
2014-12-18 17:02:29 -06:00
Lorenz Gardner 87c5e1df7d add __dirname support 2014-12-17 18:52:04 -06:00
Lorenz Gardner 05ecc6b8a5 Add JSON support for require statments. 2014-12-17 13:09:00 -06:00
LorenzIndus e89844fa78 update version of builtins in deps
Get the fix they did to include the "constants" builtin module.
2014-12-17 08:48:01 -06:00
Craig Jefferds 0637e17eb0 Merge pull request #83 from rknell/patch-1
Update README.md
2014-11-04 14:41:23 -08:00
rknell c8562c384d Update README.md
Adding missing comma to example
2014-11-05 07:57:53 +10:00
Craig Jefferds c07e1d62c7 Merge pull request #82 from RainbowDashDC/master
Prevent Windows Paths from causing issues.
2014-10-27 18:21:34 -07:00
Jared Allard ec60175d8f Prevent Windows Paths from causing issues. 2014-10-27 15:14:55 -07:00
Craig Condon 81192a7b3a v bump 2014-10-10 09:23:51 -07:00
Craig Condon 029487c187 Merge branch 'master' of github.com:crcn/nexe 2014-10-10 09:23:31 -07:00
Craig Condon 71eef791c6 fix issue loading native modules 2014-10-10 09:23:20 -07:00
Craig Jefferds e1eaaa2bfc Update README.md 2014-09-19 12:09:10 -07:00
Craig Jefferds 7ef54aa56f Merge pull request #78 from tm1000/patch-1
Update README.md
2014-09-16 11:31:11 -07:00
Craig Jefferds c09bca3462 Merge pull request #79 from tm1000/patch-2
Remove all non-ascii code from external sources
2014-09-16 11:31:01 -07:00
Andrew Nagy 552158485c Remove all non-ascii code from external sources
Remove all non-ascii code from external sources
2014-09-16 10:32:45 -07:00
Andrew Nagy 553d9a2fff Update README.md
Fix the documentation :-)
2014-09-12 16:14:04 -07:00
Craig Jefferds fcd2acfed6 Merge pull request #74 from caffeinewriter/replace-yargs
Replace optimist with yargs
2014-08-29 19:13:00 -07:00
Brandon Anzaldi 5c20233ba5 Replace optimist with yargs in nexe bin 2014-08-29 18:44:52 -07:00
Brandon Anzaldi 3a74fddcf6 Replace Optimist with Yargs in Package.json 2014-08-29 18:43:06 -07:00
Craig Condon 839741d36f cleanup 2014-08-10 23:46:38 -07:00
Craig Condon 9080b05b72 include all node.js builtins 2014-08-10 23:32:01 -07:00
Craig Condon de0a2cd517 v bump 2014-07-30 12:22:50 -07:00
Craig Condon 0f038b1de1 filter http 2014-07-30 12:22:37 -07:00
Craig Condon d7a909da71 remove commented out code 2014-07-30 11:38:16 -07:00
Craig Condon aeeb24c757 v bump 2014-07-30 11:37:20 -07:00
Craig Condon 3cc7c68b12 remove sardines - move into nexe. Use bundle.js 2014-07-30 11:37:05 -07:00
Craig Condon 9247016635 start on using browserify 2014-07-30 11:12:20 -07:00
Craig Condon bc4f50f69b fix #48 - ability to just run ----> bundle /Users/craig/Developer/Public/nexe/lib/index.js
unable to include script /Users/craig/Developer/Public/nexe/lib/exe.js from /Users/craig/Developer/Public/nexe/lib/index.js, Error: Cannot find module 'nexe'
    at Function.module.exports [as sync] (/Users/craig/Developer/Public/nexe/node_modules/sardines/node_modules/amdify/node_modules/resolve/lib/sync.js:32:11)
    at resolvePath (/Users/craig/Developer/Public/nexe/node_modules/sardines/node_modules/amdify/lib/pathInfo.js:135:20)
    at self.getPathInfo (/Users/craig/Developer/Public/nexe/node_modules/sardines/node_modules/amdify/lib/pathInfo.js:88:24)
    at /Users/craig/Developer/Public/nexe/node_modules/sardines/node_modules/amdify/lib/analyzeDeps.js:324:13
    at /Users/craig/Developer/Public/nexe/node_modules/async/lib/async.js:111:13
    at Array.forEach (native)
    at _each (/Users/craig/Developer/Public/nexe/node_modules/async/lib/async.js:32:24)
    at Object.async.each (/Users/craig/Developer/Public/nexe/node_modules/async/lib/async.js:110:9)
    at scanRequired (/Users/craig/Developer/Public/nexe/node_modules/sardines/node_modules/amdify/lib/analyzeDeps.js:321:9)
    at Function.on.success.deps.forEach.dep.source (/Users/craig/Developer/Public/nexe/node_modules/sardines/node_modules/amdify/lib/analyzeDeps.js:245:5) in cwd. Resolves package.json main script
2014-05-28 10:47:52 -07:00
Craig Condon 8a0121023e Merge pull request #55 from fritx/patch-1
Update README.md
2014-05-28 10:28:08 -07:00
Fritz Lin 7308d9665d Update README.md
Better style with Code Usage in README.md
2014-05-28 22:02:28 +08:00
Craig Condon 95afa87f71 v bump 2014-05-13 11:42:44 -07:00
Craig Condon adff5a3a7c Merge pull request #52 from jhbruhn/master
Windows support
2014-05-12 14:40:28 -07:00
Jan-Henrik 9f86d88ec5 Added Windows support to Readme 2014-05-12 20:33:04 +02:00
Jan-Henrik fd01aac2e7 Added Windows Support using vcbuild.bat 2014-05-12 20:29:02 +02:00
Craig Condon 9d372ffecd added progress to package.json 2014-03-06 11:28:00 -08:00
Craig Condon 5148a0b980 Merge pull request #46 from northshorenetworks/master
Updated README.md
2014-02-28 19:43:16 -08:00
Adam Snodgrass a20406b427 Updated README.md 2014-02-28 21:40:59 -06:00
Craig Condon f74a47f483 Merge pull request #45 from northshorenetworks/master
Remove duplicate _log definition in monkeypatch.js
2014-02-28 19:39:44 -08:00
Adam Snodgrass 1e982d0e82 Remove duplicate _log definition 2014-02-28 21:35:56 -06:00
Adam Snodgrass 7fd13d837c Merge pull request #2 from crcn/master
Pull in crcn/nexe master changes
2014-02-28 21:33:12 -06:00
Craig Condon 932db9813d Merge pull request #44 from northshorenetworks/master
Add option to pass through CLI flags but ignore node and v8 flags
2014-02-28 19:31:00 -08:00
Adam Snodgrass a0202559bc Add option to disable node and v8 flags and pass through app flags 2014-02-28 21:16:38 -06:00
Craig Condon c9025d1c74 fix typo 2014-02-28 19:01:16 -08:00
Adam Snodgrass fb57b09e66 Added progress to package.json dependencies; Defined _log in monkeypatch.js 2014-02-28 18:54:38 -06:00
Adam Snodgrass 9742681c09 Merge pull request #1 from crcn/master
Pull in crcn/nexe master changes
2014-02-28 18:14:51 -06:00
Craig Condon ca3ab97bee remove old file 2014-02-28 10:46:43 -08:00
Craig Condon 078540697c resolve merge conflict 2014-02-28 10:40:07 -08:00
Craig Condon c583e2f029 move utils to their own file 2014-02-28 10:39:13 -08:00
Craig Condon 5a7a7c9fe5 Update README.md 2014-02-28 10:33:18 -08:00
Craig Condon 0868535bbe Update README.md 2014-02-28 10:23:52 -08:00
Craig Condon 2164621498 Update README.md 2014-02-28 10:23:40 -08:00
Craig Condon 2683359460 Update README.md 2014-02-28 10:23:04 -08:00
Craig Condon 94a82867fe Update README.md 2014-02-28 10:21:27 -08:00
Craig Condon a91d0428df Update README.md 2014-02-28 10:21:17 -08:00
Craig Condon 1dee735cdb Update README.md 2014-02-28 10:20:53 -08:00
Craig Condon ed36ebb795 Merge pull request #42 from northshorenetworks/master
Add platform detection for openbsd & freebsd compatibility
2014-02-28 10:17:06 -08:00
Adam Snodgrass 10af1803ab Add platform detection for openbsd & freebsd compatibility 2014-02-27 23:08:33 -08:00
Craig Condon 9f93ac0e1e Merge branch 'master' of github.com:crcn/nexe 2014-02-27 16:49:56 -08:00
Craig Condon 66bde4c761 refactor 2014-02-27 16:49:35 -08:00
Craig Condon 3803fdaf15 Merge pull request #36 from tallesl/issue35
Solves #35
2013-12-12 22:18:07 -08:00
Talles L 847616a295 Solves #35 2013-12-13 03:25:03 -02:00
Craig Condon 085e475bd4 cleanup 2013-10-14 10:40:46 -07:00
Craig Condon 273e864e07 download latest version 2013-10-14 10:29:35 -07:00
Craig Condon 46b2761db8 v bump 2013-10-14 10:26:47 -07:00
Craig Condon 254615894f Merge branch 'master' of github.com:crcn/nexe 2013-10-14 10:25:57 -07:00
Craig Condon 1aa897e132 update node version 2013-10-14 10:25:46 -07:00
Craig Condon 8552619bc5 Merge pull request #32 from samyakbhuta/master
Installing 'nexe' globally.
2013-10-14 10:22:52 -07:00
Samyak Bhuta 9007a080cf Added preference for global install. 2013-10-14 18:47:33 +05:30
Samyak Bhuta 46503af805 'nexe', can be installed globally. 2013-10-14 16:28:08 +05:30
Craig Condon 758803540b Merge pull request #29 from alexwhitman/node-argv
Unshift 'node' onto process.argv
2013-08-18 10:36:51 -07:00
Alex Whitman 424a7bdcbb Unshift 'node' onto process.argv
The node executable is the first value in argv. This was missing after
compiling.
2013-08-18 18:16:23 +01:00
Craig Condon d44199e592 Merge pull request #28 from alexwhitman/fixup
Linting, spawning and temp directory
2013-08-17 08:37:59 -07:00
Alex Whitman 7d783ced63 Add temp option to README 2013-08-17 12:40:00 +01:00
Alex Whitman 85b9250b9a Add -t|--temp option to specify location for node.js sources 2013-08-17 12:04:38 +01:00
Alex Whitman b2871f09cd Rewrite configure/make spawning 2013-08-17 11:36:03 +01:00
Alex Whitman 6ff539b4e6 Fix up linting warnings
- Mix of tabs and spaces
- Trailing whitepsace
- Missing semi-colons
2013-08-17 10:31:55 +01:00
Craig Condon e8ea712a45 fix #26 - should resolve to absolute path unless / is the first character 2013-07-26 13:40:54 -07:00
Craig Condon c3c1ddaaf0 added mit license 2013-06-04 14:32:26 -07:00
Craig Condon b89f9650c5 update readme 2013-04-29 12:41:14 -07:00
Craig Condon b78cea8c35 updated example 2013-04-09 13:52:47 -07:00
Craig Condon ddea854649 replace browserify with sardines 2013-04-09 13:37:45 -07:00
Craig Condon 0281273cd0 v bump 2013-02-27 11:27:10 -08:00
Craig Condon 336a30e7c0 added ability to use -h or --help for help menu 2013-02-27 11:26:44 -08:00
Craig Condon 4f9c040d74 properly parse relative path 2013-02-01 11:39:52 -08:00
Craig Condon cdbdbfbb0d cleanup 2013-02-01 11:39:32 -08:00
Craig Condon 63ba6a307b Merge branch 'master' of github.com:crcn/nexe 2013-02-01 11:37:03 -08:00
Craig Condon bea9181be6 properly parse relative path 2013-02-01 11:36:47 -08:00
Craig Condon 6a62ea8f10 Update README.md 2013-02-01 11:30:47 -08:00
Craig Condon f1a0eb88fd added dependency 2013-01-31 12:19:14 -08:00
Craig Condon e43a473559 Update README.md 2012-12-02 12:08:10 -06:00
Craig Condon 207e381309 remove node modules 2012-11-30 20:17:44 -06:00
Craig Condon 14005e70d9 cleanup 2012-11-30 20:16:17 -06:00
Craig Condon d6b65478ce finally works 2012-11-30 20:12:56 -06:00
Craig Condon 11aaccdf66 finally works 2012-11-30 20:11:55 -06:00
Craig Condon 45dd2d2680 fix package repo 2012-02-17 14:54:58 -06:00
Craig Condon a1a06e310c update pkg 2011-11-30 12:55:16 -06:00
Craig Condon 716d947914 updated readme 2011-11-26 17:34:11 -06:00
Craig Condon 5076c15e76 typo 2011-11-26 17:30:50 -06:00
Craig Condon 2995a3d916 can build node.js file from cwd now 2011-11-26 17:30:13 -06:00
Craig Condon d0e259be6f can build node.js file from cwd now 2011-11-26 17:24:25 -06:00
Craig Condon b2f621d7d0 updated readme 2011-11-26 17:03:30 -06:00
Craig Condon a2f6492d71 updated readme 2011-11-26 17:03:08 -06:00
Craig Condon c8aa6a8326 updated readme 2011-11-26 17:01:47 -06:00
Craig Condon 9b82355175 ability to build executables 2011-11-26 17:00:12 -06:00
20 changed files with 204 additions and 310 deletions
+2 -2
View File
@@ -5,5 +5,5 @@ src
nexe.exe
nexe
npm-debug.log
examples/**/src
examples/**/out.nex
# test/**/src
test/**/out.nex
+9 -7
View File
@@ -1,7 +1,9 @@
### Nexe
[![Join the chat at https://gitter.im/crcn/nexe](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/crcn/nexe?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Dependency Status](https://david-dm.org/crcn/nexe.svg)](https://david-dm.org/crcn/nexe)
[![Stories in Ready](https://badge.waffle.io/crcn/nexe.svg?label=ready&title=Ready)](http://waffle.io/crcn/nexe)
[![Join the chat at https://gitter.im/crcn/nexe](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/jaredallard/nexe?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Dependency Status](https://david-dm.org/jaredallard/nexe.svg)](https://david-dm.org/crcn/nexe)
[![Stories in Ready](https://badge.waffle.io/jaredallard/nexe.svg?label=ready&title=Ready)](http://waffle.io/jaredallard/nexe)
# NOTICE: Node 5.x.x is broken right now.
Nexe is a command-line utility that compiles your Node.js application into a single executable file.
@@ -136,12 +138,12 @@ var nexe = require('nexe');
nexe.compile({
input: 'input.js',
output: 'path/to/bin',
nodeVersion: '0.12.5',
nodeVersion: '5.5.0',
nodeTempDir: 'src',
python: 'path/to/python',
resourceFiles: [ 'path/to/a/file' ],
flags: true,
framework: "nodejs"
framework: "node" // node, nodejs, or iojs
}, function(err) {
console.log(err);
});
@@ -159,8 +161,8 @@ is still in works, so it is likely to change.
"output": "nexe^$",
"temp": "src",
"runtime": {
"framework": "iojs",
"version": "2.3.1",
"framework": "node",
"version": "5.5.0",
"ignoreFlags": true
}
}
@@ -174,4 +176,4 @@ Notes:
* __Jared Allard__ ([@jaredallard](https://github.com/jaredallard)) &lt;[jaredallard@outlook.com](mailto:jaredallard@outlook.com)&gt; (Active)
* __Christopher Karper__ ([@ckarper](https://github.com/CKarper)) &lt;[Christopher.Karper@gmail.com](mailto:Christopher.Karper@gmail.com)&gt; (Active)
* __Craig Jefferds__ ([@crcn](https://github.com/crcn)) &lt;[craig.j.condon@gmail.com](mailto:craig.j.condon@gmail.com)&gt; (Not Active)
* __Craig Condon__ ([@crcn](https://github.com/crcn)) &lt;[craig.j.condon@gmail.com](mailto:craig.j.condon@gmail.com)&gt; (Old Project Owner)
-1
View File
@@ -1 +0,0 @@
console.log("hello browser!");
-19
View File
@@ -1,19 +0,0 @@
var nexe = require('../..');
nexe.compile(
{
input: "./index.js",
output: "./out.nex",
nodeVersion: "3.0.0",
framework: "iojs",
nodeTempDir: "src",
python: "python",
flags: true,
resourceFiles: ["./message.txt"]
},
function (err) {
if (err) {
console.log(err);
}
}
);
-1
View File
@@ -1 +0,0 @@
Hello World!!!
-23
View File
@@ -1,23 +0,0 @@
var http = require("http"),
fs = require("fs"),
path = require("path"),
nexeres = require("nexeres"),
childProc = require("child_process"),
port = 1337;
//Fork a new process to execute the broser.js
childProc.fork(path.join(__dirname, "browser.js"));
if (false) {
require("./browser.js"); //force the bundler to include the .js file
}
//start a web server on specified port (or default if not given)
console.log("started HTTP server on port %d", port = Number(process.argv.concat().pop()) || port);
http.createServer(function(req, res) {
//return the embeded file in response to any request
res.write(nexeres.get("message.txt"));
res.end();
}).listen(port);
-1
View File
@@ -1 +0,0 @@
hello world!
-4
View File
@@ -1,4 +0,0 @@
{
"main": "./index.js",
"browser": "./index.js"
}
-1
View File
@@ -1 +0,0 @@
console.log("hello browser!");
-18
View File
@@ -1,18 +0,0 @@
var nexe = require('../..');
nexe.compile(
{
input: "./index.js",
output: "./out.nex",
nodeVersion: "3.0.0",
nodeTempDir: "./src",
framework: "iojs",
python: 'python',
flags: true
},
function (err) {
if (err) {
console.log(err);
}
}
);
-23
View File
@@ -1,23 +0,0 @@
var http = require("http"),
fs = require("fs"),
path = require("path"),
nexeres = require("nexeres"),
childProc = require("child_process"),
port = 1337;
//Fork a new process to execute the broser.js
childProc.fork(path.join(__dirname, "browser.js"));
if (false) {
require("./browser.js"); //force the bundler to include the .js file
}
//start a web server on specified port (or default if not given)
console.log("started HTTP server on port %d", port = Number(process.argv.concat().pop()) || port);
http.createServer(function(req, res) {
//return the embeded file in response to any request
res.write("Hello, world!");
res.end();
}).listen(port);
-1
View File
@@ -1 +0,0 @@
hello world!
-4
View File
@@ -1,4 +0,0 @@
{
"main": "./index.js",
"browser": "./index.js"
}
+53 -151
View File
@@ -1,5 +1,6 @@
/**
* Copyright (c) 2013 Craig Condon
* Copyright (c) 2015-2016 Jared Allard
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@@ -21,165 +22,66 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
**/
var mdeps = require("module-deps"),
through = require("through"),
async = require("async"),
builtins = require("builtins");
var mdeps = require("module-deps"),
path = require("path"),
spawn = require('child_process').spawn,
fs = require("fs"),
through = require("through2"),
async = require("async"),
browserify = require('browserify'),
builtins = require("builtins"),
_log = require("./log");
var _log = require("./log");
/**
* User browserify to create a "packed" file.
*
* @param {String} input - input file
* @param {String} nc - node compiler dir
* @param {Function} complete - next function to call (async)
**/
function bundle (input, nc, complete) {
var bundlePath = path.join(nc, "lib", "nexe.js");
var ws = fs.createWriteStream(bundlePath);
var proc = spawn('node', [path.join(__dirname, '../', 'node_modules/browserify/bin/cmd.js'), '--node', input ]);
function bundle (input, complete) {
// TODO: Get path of nexe directory, and refer to it.
async.waterfall([
proc.stdout.pipe(ws);
/**
* first we resolve all of the deps
*/
proc.on('error', function(err) {
console.error(err.toString('ascii'));
_log('error', 'Failed to invoke browserify');
process.exit(1);
})
function resolveDeps (next) {
proc.stderr.on('data', function(data) {
console.error(data.toString('ascii'));
_log('error', 'Browserify failed to launch');
process.exit(1);
});
proc.on('close', function(code) {
_log("Browserify finished");
})
var deps = [];
ws.on('error', function(err) {
console.log(err);
_log('error', 'Failed to save stdout to disk');
process.exit(1);
})
ws.on('close', function() {
var source = fs.readFileSync(bundlePath, 'utf8');
source = source.replace(/[^\x00-\x7F]/g, "");
var md = mdeps({
xtransform: function (tr, file) {
var buffer = [];
console.log(tr);
return through(write, end);
var self = this;
function write (chunk) {
buffer.push(chunk.toString());
// console.log(chunk.toString(""))
console.log(tr);
}
function end() {
var content = buffer.join("");
// console.log(content);
/*
// TODO add uglify flag
var source = uglify.parse(content, {
strict: false
});
source.figure_out_scope();
source.compute_char_frequency();
source.mangle_names();
// TODO - production
content = source.print_to_string({
ascii_only: true,
quote_keys: true
});*/
this.queue(content);
this.queue(null);
}
},
filter: function (id) {
if ([ 'nexeres', 'sys', 'readline' ].indexOf(id) > -1) { return false; }
return !~builtins.indexOf(id);
},
extensions: [ '.js', '.json' ],
ignoreMissing: true
});
/** event for missing packages, fixes conditional requires **/
md.on('missing', function(id, parent) {
_log("warn", "couldn't find require '" + id + "', errors may occur.");
});
md.pipe(through(function (chunk) {
deps.push(chunk);
}, function () {
next(null, deps);
}));
md.end({ file: input })
},
function bundleScript (deps, next) {
var buffer = [loader.toString()];
var dbuffer = [];
for (var i = deps.length; i--;) {
var dep = deps[i];
var req = "function (require, module, exports, __dirname) { \n"
if (dep.id.toLowerCase().indexOf(".json", dep.id.length - 5) !== -1) {
//this is the result of require("someFile.json"), so we need to export it from the function
req += "module.exports = "
}
if ((/^\#\!/).test(dep.source)) {
dep.source = '//' + dep.source;
}
req += dep.source + "}";
dbuffer.push(JSON.stringify(dep.id) + ": ["+req+", "+!!dep.entry+", "+JSON.stringify(dep.deps)+"]")
// write the source modified to nexe.js
fs.writeFile(bundlePath, source, 'utf8', function(err) {
if(err) {
_log('error', 'failed to save source');
process.exit(1);
}
buffer = ["(" + loader.toString() + ").call(null, {"+dbuffer.join(",")+"}," + JSON.stringify(deps[deps.length-1].id) + ")"].toString();
next(null, buffer);
}
], complete)
}
var loader = function (deps, key) {
var pathModule = global.require("path");
var darr = [];
var dir = global.require("path").dirname(process.execPath);
var argv3 = process.argv[3];
if (argv3) {
argv3 = pathModule.relative(pathModule.dirname(process.execPath), argv3);
argv3 = pathModule.resolve(pathModule.dirname(key), argv3);
}
if (process.argv[2] == "--child_process" && deps[argv3]) {
//we've been forked and should run the module specified by argv3[3] instead of the start up module
key = argv3;
process.argv.splice(2, 2); //restore the argv to [0] = executable, [1] = nexejs
}
else if (process.argv[2] == "--child_process") {
//fork called, but for a module not bundled.
argv3 = process.argv[3];
process.argv.splice(1, 2); //restore the argv to [0] = executable, [1] = script
global.require(argv3);
return;
}
darr.push(deps[key]); //start up module.
function initModule (dep) {
if (dep.module) return dep.module.exports;
dep.module = { exports: {} };
dep[0](function (path) {
var rdep = deps[dep[2][path]];
var exports = rdep ? rdep.module ? rdep.module.exports : initModule(rdep) : global.require(path);
return exports;
}, dep.module, dep.module.exports, dir);
return dep.module.exports;
}
//run the startup module
darr.forEach(initModule);
return darr.filter(function (dep) {
return dep[1];
}).map(function (dep) {
return dep.module || {};
}).pop();
}
module.exports = bundle;
complete();
});
});
+2 -1
View File
@@ -1,5 +1,6 @@
/**
* Copyright (c) 2013 Craig Condon
* Copyright (c) 2015-2016 Jared Allard
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@@ -21,7 +22,7 @@
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
**/
var path = require("path"),
fs = require("fs");
+78 -39
View File
@@ -1,5 +1,6 @@
/**
* Copyright (c) 2013 Craig Condon
* Copyright (c) 2015-2016 Jared Allard
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@@ -138,7 +139,7 @@ exports.compile = function (options, complete) {
* first download node
*/
function downloadNode (next) {
_downloadNode(version, options.nodeTempDir, next);
_downloadNode(version, options.nodeTempDir, nodeConfigureArgs, nodeMakeArgs, next);
},
/**
@@ -148,21 +149,7 @@ exports.compile = function (options, complete) {
function combineProject (nc, next) {
nodeCompiler = nc;
_log("bundle %s", options.input);
bundle(options.input, next);
},
/**
* write the bundle to the lib directory of the target node version
*/
function writeBundle (source, next) {
bundlePath = path.join(nodeCompiler.dir, "lib", "nexe.js");
_log("bundle -> %s", bundlePath);
//Remove all non-ascii code from sources
source = source.replace(/[^\x00-\x7F]/g, "");
// same path as all the other JS files
fs.writeFile(bundlePath, source, next);
bundle(options.input, nodeCompiler.dir, next);
},
function embedResources(next) {
@@ -196,18 +183,37 @@ exports.compile = function (options, complete) {
}
},
/**
* monkeypatch child_process.js so nexejs knows when it is a forked process
*/
function monkeyPatchChildProc(next) {
_monkeyPatchChildProcess(nodeCompiler, next);
},
/**
* monkeypatch child_process.js so nexejs knows when it is a forked process
*/
function monkeyPatchChildProc(next) {
_monkeyPatchChildProcess(nodeCompiler, next);
},
/**
* If an old compiled executable exists in the Release directory, delete it.
* This lets us see if the build failed by checking the existence of this file later.
*/
function cleanUpOldExecutable (next) {
fs.unlink(nodeCompiler.releasePath, function (err) {
if (err) {
if (err.code === "ENOENT") {
next();
} else {
throw err;
}
} else {
next();
}
});
},
/**
* compile the node application
*/
function makeExe (next) {
function makeExecutable (next) {
if(isWin) {
_log("vcbuild [make stage]");
} else {
@@ -224,6 +230,25 @@ exports.compile = function (options, complete) {
mkdirp(path.dirname(options.output), function(){ next(); });
},
/**
* Verify that the executable was compiled successfully
*/
function checkThatExecutableExists (next) {
fs.exists(nodeCompiler.releasePath, function (exists) {
if (!exists) {
_log("error",
"The release executable has not been generated. " +
"This indicates a failure in the build process. " +
"There is likely additional information above."
);
throw new Error("The release executable was not built ('" + nodeCompiler.releasePath + "')");
} else {
next();
}
});
},
/**
* Copy the compilied binary to the output specified.
*/
@@ -251,14 +276,13 @@ exports.compile = function (options, complete) {
* @param {function} complete, callback
*/
function _downloadNode (version, directory, complete) {
function _downloadNode(version, directory, nodeConfigureArgs, nodeMakeArgs, complete) {
var nodeFileDir = path.resolve(path.join(directory, framework, version)), // fixes #107, was process.cwd(), + rest.
nodeFilePath = path.resolve(path.join(nodeFileDir, framework + "-" + version + ".tar.gz"));
// might already be downloaded, and unzipped
if (_getNodeCompiler(nodeFileDir, complete)) {
if (_getNodeCompiler(nodeFileDir, nodeConfigureArgs, nodeMakeArgs, complete)) {
return;
}
@@ -281,11 +305,16 @@ function _downloadNode (version, directory, complete) {
function downloadNode (next) {
if (fs.existsSync(nodeFilePath)) return next();
var type = global.type;
var url, prefix = "https://"+framework+".org/dist";
var uri = framework;
// pick which url depending on the version
if(framework==="nodejs") framework = "node"; // cmon node why can't you stay the same
if(framework==="node") {
uri = 'nodejs'; // if node, use nodejs uri
} else if(framework === 'nodejs') {
framework = 'node'; // support nodejs, and node, as framework.
}
var type = global.type;
var url, prefix = "https://"+uri+".org/dist";
if (version === "latest") {
url = prefix + "/" + framework + "-" + version + ".tar.gz";
@@ -335,7 +364,7 @@ function _downloadNode (version, directory, complete) {
*/
function (next, type) {
_getNodeCompiler(nodeFileDir, next, type)
_getNodeCompiler(nodeFileDir, nodeConfigureArgs, nodeMakeArgs, next, type)
},
], complete);
@@ -346,7 +375,7 @@ function _downloadNode (version, directory, complete) {
* it.
*/
function _getNodeCompiler (nodeFileDir, complete, type) {
function _getNodeCompiler (nodeFileDir, nodeConfigureArgs, nodeMakeArgs, complete, type) {
var dir = _getFirstDirectory(nodeFileDir);
// standard
@@ -394,9 +423,9 @@ function _getNodeCompiler (nodeFileDir, complete, type) {
make: function (next) {
var cfg = "./configure", configure;
if(isPy !== "python") {
configure = spawn(isPy, [cfg], { cwd: dir });
configure = spawn(isPy, [cfg].concat(nodeConfigureArgs), { cwd: dir });
} else {
configure = spawn(cfg, [], { cwd: dir });
configure = spawn(cfg, nodeConfigureArgs, { cwd: dir });
}
// local function, move to top eventually
@@ -448,7 +477,7 @@ function _getNodeCompiler (nodeFileDir, complete, type) {
if (os.platform().match(/bsd$/) != null) {
platformMake = "gmake";
}
var make = spawn(platformMake, [], { cwd: dir });
var make = spawn(platformMake, nodeMakeArgs, { cwd: dir });
make.stdout.pipe(process.stdout);
make.stderr.pipe(process.stderr);
make.on("close", function () {
@@ -517,7 +546,13 @@ function _monkeyPatchMainJs (compiler, complete) {
return ~content.indexOf("nexe");
},
function (content, next) {
next(null, content.replace(/\(function\(process\) \{/,'(function(process) {\n process._eval = \'require("nexe");\';\n process.argv.splice(1, 0, "nexe.js");\n'))
next(null, content.replace(/\(function\(process\) \{/,'\
(function(process) {\n\
process._eval = \'require("nexe");\';\n\
if (process.argv[1] !== "nexe.js") {\n\
process.argv.splice(1, 0, "nexe.js");\n\
}\n\
'))
},
complete
);
@@ -534,7 +569,7 @@ function _monkeyPatchChildProcess(compiler, complete) {
return ~content.indexOf("--child_process");
},
function (content, next) {
next(null, content.replace(/return spawn\(/, 'args.unshift("--child_process");\n return spawn('));
next(null, content.replace(/return spawn\(/, 'args.unshift("nexe.js", "--child_process");\n return spawn('));
},
complete
);
@@ -554,7 +589,7 @@ function _monkeyPatchMainCc(compiler, complete) {
function (content, next) {
var lines = content.split('\n');
var endLine = lines.indexOf(' option_end_index = i;'); // pre node 0.11.6 compat
if(endLine !== -1) { // check if it succedded or not.
lines[endLine] = ' option_end_index = 1;';
_log("patched node.cc")
@@ -627,7 +662,7 @@ function _logProgress (req) {
*
* @param {string} path - path to package.json
* @param {object} options - fallback options
*
*
* @todo implement options overriding package defaults.
*
* @return {object} nexe.compile options object
@@ -654,8 +689,12 @@ exports.package = function(path, options) {
input: (_package.nexe.input || options.i),
output: (_package.nexe.output || options.o),
flags: (_package.nexe.runtime.ignoreFlags || options.f),
nodeConfigureArgs: (_package.nexe.runtime.nodeConfigureArgs || []),
nodeMakeArgs: (_package.nexe.runtime.nodeMakeArgs || []),
resourceFiles: (_package.nexe.resourceFiles),
nodeVersion: (_package.nexe.runtime.version || options.r),
nodeConfigureArgs: (_package.nexe.runtime.nodeConfigureArgs || []),
nodeMakeArgs: (_package.nexe.runtime.nodeMakeArgs || []),
python: (_package.nexe.python || options.p),
nodeTempDir: (_package.nexe.temp || options.t),
framework: (_package.nexe.runtime.framework || options.f)
+19 -14
View File
@@ -3,7 +3,7 @@
"name": "nexe",
"description": "create single executables out of your [node/io].js applications",
"license": "MIT",
"version": "0.4.1",
"version": "1.0.0",
"contributors": [
{
"name": "Criag Condon",
@@ -17,34 +17,39 @@
},
"main": "./lib/index.js",
"dependencies": {
"async": "1.2.1",
"builtins": "1.0.1",
"colors": "^1.0.3",
"glob": "^5.0.5",
"mkdirp": "^0.5.0",
"module-deps": "^3.6.4",
"async": "1.5.2",
"browserify": "^13.0.0",
"builtins": "1.0.3",
"colors": "^1.1.2",
"glob": "^6.0.4",
"insert-module-globals": "^7.0.1",
"mkdirp": "^0.5.1",
"module-deps": "^4.0.5",
"ncp": "^2.0.0",
"outcome": "0.0.18",
"progress": "^1.1.8",
"request": "^2.53.0",
"request": "^2.67.0",
"sprintf": "~0.1.5",
"step": "0.0.x",
"tar.gz": "0.1.1",
"through": "^2.3.6",
"yargs": "^3.2.1"
"tar.gz": "1.0.2",
"through": "^2.3.8",
"yargs": "^3.32.0"
},
"nexe": {
"input": "./bin/nexe",
"output": "nexe^$",
"temp": "src",
"runtime": {
"framework": "iojs",
"version": "2.3.1",
"framework": "nodejs",
"version": "5.5.0",
"ignoreFlags": true
}
},
"preferGlobal": "true",
"preferGlobal": true,
"bin": {
"nexe": "./bin/nexe"
},
"devDependencies": {
"nodeunit": "^0.9.1"
}
}
BIN
View File
Binary file not shown.
+17
View File
@@ -0,0 +1,17 @@
/**
* Test Express with nexe
**/
console.log('express init');
var express = require('express');
var app = express();
app.get('/', function(req, res) {
res.send('It works!');
});
app.listen(8000, function() {
console.log('Listening on port 8000');
});
+24
View File
@@ -0,0 +1,24 @@
{
"name": "express-test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"nexe": {
"input": "./index.js",
"output": "express-test^$",
"temp": "src",
"runtime": {
"framework": "nodejs",
"version": "5.5.0",
"ignoreFlags": true
}
},
"dependencies": {
"express": "^4.13.4"
}
}