Clojurescript programs targeting nodejs should support global installation

Description

The top-level entry point in a :target :nodejs application uses $CWD relative paths to load the bootstrapping. See "path.resolve('.')" here: https://github.com/clojure/clojurescript/blob/296d0a69340e832b92ed742b3cd0304a06bea27f/src/main/clojure/cljs/closure.clj#L1460 for example.

This works fine for a local build, but is problematic when we try to globally install clojurescript (such as via 'npm install -g') because it requires the caller $CWD to be something that is likely to be unnatural (e.g. /usr/lib/node_modules/$pkg). Suggested fix is to replace "path.resolve('.')" with "__dirname".

Environment

None

Attachments

1
  • 28 Mar 2017, 07:38 PM

Activity

Show:

Matt Lee April 24, 2017 at 8:34 AM

Also see: [CLJS-1444]

Details

Assignee

Reporter

Priority

Created March 28, 2017 at 7:11 PM
Updated April 24, 2017 at 8:34 AM

Flag notifications