Closed Ddhuet closed 2 years ago
I believe you can download off npm and copy the single .js file to your project, if you don't want to depend on npm.
I believe you can download off npm and copy the single .js file to your project, if you don't want to depend on npm.
I don't see a way to do that on the npm site. Regardless, it seems like a pointless barrier to newcomers trying out the code. I have never before seen a browser library that didn't have a precompiled JS file.
We don't commit the build files. This is typical for node.js projects. The npm module has the built code. If you want to build from source you can:
npm run build
dist
folder.Here is a one liner for you
git clone https://github.com/NateTheGreatt/bitECS.git && cd bitecs && npm i && npm run build && cd dist
Otherwise you can npm install and then grab the files out of node_modules
npm i bitecs && cd node_modules/bitecs/dist
Maybe @NateTheGreatt can start tagging releases and uploading the built files to the release.
Using the releases on GitHub would be good, but in case it's useful to OP or anyone else, you can use unpkg to download (or CDN) any file on NPM.
https://unpkg.com/bitecs will serve the file defined in the package main
field for the latest version.
We don't commit the build files. This is typical for node.js projects. The npm module has the built code. If you want to build from source you can:
- Clone this repo
- Install dependencies
- Run
npm run build
- Grab the built files from the
dist
folder.Here is a one liner for you
git clone https://github.com/NateTheGreatt/bitECS.git && cd bitecs && npm i && npm run build && cd dist
Otherwise you can npm install and then grab the files out of node_modules
npm i bitecs && cd node_modules/bitecs/dist
Maybe @NateTheGreatt can start tagging releases and uploading the built files to the release.
It makes perfect sense for a node project, but this one does specifically state for node or browser. I appreciate the solutions posted and was able to get a build just using node, but it's quite a process for someone who only wants it for browser usage. Personally I'm on Windows at the moment and had to get node, download the repo, fix node issues, and then spend a surprising amount of time figuring out where node actually puts the built file. All for a 4KB JS file.
I find unpkg to have really inconsistent latency. Sometimes it's acceptable sometimes it is not.
I spoke with @NateTheGreatt and he is going to start tagging releases and uploading the build files. He's been busy lately, but will get to it when he can. Going to close this issue now as there are a few ways to solve the problem in the mean time.
Am I missing something? Why isn't there a release or link to the actual .js file? Compilation with node can either be a huge hassle or impossible on certain platforms.