I’ve been out of it the past couple years as far as FE dev goes, so having a bit of a problem following the install guide. The guide simply says to run npm install prosemirror
, but doesn’t seem to give me something usable? (I gave up on the npm module, as once I run that, and run npm install in the prosemirror folder it gives me the following error when I try to npm run dist
(I am on Arch Linux w/ node 6.1.0 and npm 3.9.0):
path.js:1142
cwd = process.cwd();
^
Error: ENOENT: no such file or directory, uv_cwd
at Error (native)
at Object.resolve (path.js:1142:25)
at Function.Module._resolveLookupPaths (module.js:359:17)
at Function.Module._resolveFilename (module.js:429:31)
at Function.Module._load (module.js:386:25)
at Module.require (module.js:466:17)
at require (internal/module.js:20:19)
at /usr/lib/node_modules/npm/bin/npm-cli.js:25:13
at Object.<anonymous> (/usr/lib/node_modules/npm/bin/npm-cli.js:75:3)
at Module._compile (module.js:541:32)
I am able to install ProseMirror via Bower (1.7.9):
bower install prosemirror
cd bower_components/prosemirror
npm install
npm run dist
npm run demo
This gives me working code in dist
and runs the demo server on http://localhost:8080/
. I can leave npm run dist-watch
running and it’ll transpile automatically when I edit the src
files, so so far so good.
The part I’m trying to figure out is that the localhost demo seems to serve a bundle via /moduleserve/load.js
and the online demos serve a static bundle. Again the guide talks about bundling, but I’m not exactly sure how the Makefile works in the site, and there doesn’t seem to be instructions for bundling directly against the repo.
Am I supposed to simple run this in dist
?
browserify */*.js --outfile bundle.js
This seems to make a 5.4MiB file. Is this correct? Is there a different/better way to require modules directly from dist? (also something that saves the bundling process while I’m developing?)
Also, is using the bower_components folder in the htdocs of my project the appropriate way to go? Once I begin making modifications to src, should I consider this ‘forked’ or am I able to continue to use Bower to run upgrades?