Closed fanatid closed 7 years ago
I'm not sure I understand what build-jslib-ci does. It auto-creates a dist/ folder every time the version is bumped? Is this auto-created dist/ folder on npm as well as github?
build-jslib-ci
auto-create dist folder on CI server on every version bump and upload files from there to github release
It works like prebuild-ci
which generate bindings and upload them to github: https://github.com/Level/leveldown/releases/tag/v1.6.0
Is this auto-created dist/ folder on npm as well as github?
No. Why you need dist/
in npm package?
any comments?
I like the idea! But, I think I would prefer to keep the dist/ folder in the repo for now. I like having the dist folder there because it makes using keythereum in the browser absolutely dead simple. It's becoming less common to directly import JS files via script tag, but when script tags are used, they tend to be used by less experienced developers, so I like to keep things as simple for them as possible.
I still don't understand motivation... files from dist will be uploaded to github releases and will be available like files from repository and why need dist in npm?
If the dist files are only uploaded to releases, then someone checking out the repo will not see them unless they checkout a release. (Or, am I misunderstanding how build-jslib-ci works?) It is not a big deal, but I think people may not realize you have to manually checkout a release to get the pre-browserified distributable.
You're correct that dist is not needed in npm. I should have excluded it from npm but had not done so. I've just now added dist to .npmignore. Good catch, thank you!
If the dist files are only uploaded to releases, then someone checking out the repo will not see them unless they checkout a release. (Or, am I misunderstanding how build-jslib-ci works?) It is not a big deal, but I think people may not realize you have to manually checkout a release to get the pre-browserified distributable.
We can put notes about this to README. The main idea of build-jslib-ci
that you don't need care that you really build files in dist
for every release. Also when you merge PR dist is not updated automatically and if you look on files in commit https://github.com/ethereumjs/keythereum/tree/9ba61fc1f3df19109c98dffbf6f03d4dd52025c7 you can see that dist not match with code, but this is not really big deal.
You're correct that dist is not needed in npm. I should have excluded it from npm but had not done so. I've just now added dist to .npmignore.
Not big fun of .npmignore
, I thunk files
in package.json
is better because it white list (let me know if you want change it, I'll create PR).
JFYI some names will be always ignored/added: https://github.com/npm/npm/blob/v4.5.0/lib/utils/tar.js#L66
I don't want force you accept this PR.. this is only my opinion.
build-jslib-ci is experimental project (
keyethereum
is a first project who will use it 😄)keythereum.js
andkeythereum.min.js
will be uploaded to github releases on every version bump 🚀