Open programkode opened 5 years ago
Ah, yes, certainly an oversight on my part when it comes to commiting node_modules
and not .gitignore
.
When it comes to the build process for JS, I just throw it into Closure Compiler with default settings, nothing fancy. Could probably use CONTRIBUTING.md
file.
Edit: f848e45a0095926a3ee17380fc6592056b9ebb59 node_modules
untracked, .gitignore
commited, Javascript files moved into its own dir.
I'll have to look up some build systems, since so far I've been exclusively using Webstorm file watchers. Any recommendations?
Usually for Node.js projects, even if they are not meant to be consumed as an NPM package, it's much cleaner to not commit your
node_modules
folder, and instead upload thepackage.json
so those who want to contribute can just runnpm install
after cloning/forking the project. This also allows you to streamline the process in terms of adding build scripts and such into thescripts
section inpackage.json
.The
package-lock.json
file will take care of package versions so those who install your project will get the same dependencies as you had when you installed npm packages to your project.Also you should commit a
.gitignore
file.As it currently stands, it's really hard to contribute seeing as there are no build scripts or an easy way of testing it, as you currently have to edit
index.html
to useeditor.js
, make changes, and then have no way of producing a minified build as you did before uploading.I opened this issue as I took a look at the code and saw some optimizations (to decrease the size!) I could add, but I had no way of easily testing and iterating on it.