NateTheGreatt / bitECS

Flexible, minimal, data-oriented ECS library for Typescript
Mozilla Public License 2.0
944 stars 84 forks source link

No release? #85

Closed Ddhuet closed 2 years ago

Ddhuet commented 2 years ago

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.

EnderShadow8 commented 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.

Ddhuet commented 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 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.

SupremeTechnopriest commented 2 years ago

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:

  1. Clone this repo
  2. Install dependencies
  3. Run npm run build
  4. 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.

vegeta897 commented 2 years ago

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.

Ddhuet commented 2 years ago

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:

  1. Clone this repo
  2. Install dependencies
  3. Run npm run build
  4. 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.

SupremeTechnopriest commented 2 years ago

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.