chessboard-element icon indicating copy to clipboard operation
chessboard-element copied to clipboard

how come the contents of the node_modules folder once installed differs from this repository's files?

Open vesper8 opened this issue 4 years ago • 2 comments

I'm confused here, when I install your package via NPM the contents of the chessboard-element folder inside my node_modules folder has a bunch of .js files that are nowhere to be found in this repository

I decided to fork your package so I can immediately use my click-to-move PR and when I tried to reference my fork inside my package.json I end up with an error because those .js files are not present

But when I install your package then they are present

What voodoo magic is at play here? Is there a command that needs to be run to generate the .js files?

I would love to have more information so I can get my fork working

Many thanks

vesper8 avatar Dec 09 '20 12:12 vesper8

I was able to get it working by going inside the node_modules/chessboard-element folder, running yarn and then yarn bundle

That still did not generate the js files inside node_modules/chessboard-element/src/lib

But at least it made my errors go away

Would still appreciate knowing why the .js files are missing from this repository but present in the node_modules/chessboard-element/src/lib/ folder

And I guess in the future if I make updates to my fork, then I should run the bundle command and commit this file too, right?

Thanks

vesper8 avatar Dec 09 '20 12:12 vesper8

This project is written in TypeScript and the built JavaScript is published to npm. The difference between GitHub is expected and normal for compiled languages. You should only commit the source TypeScript files to git.

justinfagnani avatar May 20 '21 00:05 justinfagnani