bpanel-org / bpanel

A Blockchain Management System, powered by bcoin
https://bpanel.org
Other
53 stars 23 forks source link

Enable installation from npm #175

Closed pinheadmz closed 3 years ago

pinheadmz commented 5 years ago

This is the branch I'm using to test the easy-installer script.

Closes #173

To test:

GIT

git clone https://github.com/pinheadmz/bpanel
cd bpanel
git checkout npmidev
npm install
npm run start:poll

NPM

option 1:

npm install pinheadmz/bpanel#npmidev
cd node_modules/@bpanel/bpanel
npm run start:poll

option 2 (ensure no weird relative paths from cwd):

npm install pinheadmz/bpanel#npmidev
node --max_old_space_size=4096 node_modules/@bpanel/bpanel/server/index.js --dev --watch-poll
bucko13 commented 5 years ago

I wonder if we can get around having to do that long node command by adding a bin similar to the way bcoin works for example (or even w/ webpack, you can see it has a much simpler command to run from command line ./node_modules/.bin/webpack

pinheadmz commented 5 years ago

You mean the command to start bpanel?

bucko13 commented 5 years ago

Yep, instead of node --max_old_space_size=4096 node_modules/@bpanel/bpanel/server/index.js --dev --watch-poll. if we have a ./bin/bpanel it could consolidate all of that.

bucko13 commented 5 years ago

and if running from an npm script, if we had the bin, you could just do something like:

"bpanel": "bpanel [...args for bpanel]"

in your package.json scripts object, or even run from command line if installed globally.