-
-
Notifications
You must be signed in to change notification settings - Fork 995
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Quality, Tools and Packaging #12
base: master
Are you sure you want to change the base?
Conversation
Could we need some CI setup? |
Yeh, it's in the |
@konsumer is this still a work in progress? I'm interested in using this in react and trying to determine if I'd be duplicating work. |
@konsumer P.S. I would start with making this an NPM module with a build process first |
@joelvh I got busy with other work. Feel free to use any ideas you find here. I ended up having issues with the demo not building, I think I probably left some key thing out. |
This does have build process. (see
but otherwise it should be all ready for npm, once the demo works. |
Would love to ensure we preserve the simplicity of this project to avoid needing to compile code to run it. Part of the usefulness in this project is that it has no build dependencies |
The build is optional, and just for publishing on npm. Using ES6 has become a pretty standard way to distribute a JS library for the web and elsewhere. If you look here, it just injects a global in the window ( <script type="module">
import flowy from 'https://path.to.cdn/flowy.js'
// do stuff
</script> If the code is structured as an ES6 module, additionally, it can be used in any modern build system, as well as no build system. Another option would be to add a trivial import entry-point that does the same thing: // flowy-global.js
import flowy from './flowy.js'
window.flowy = flowy <script type="module" src="'https://path.to.cdn/flowy-global.js"></script>
<script>
// use flowy exactly as you did before, even though I wouldn't really recommend this
</script> |
This is a WIP, and should not be merged until these are complete:
I am working on these now, and will remove this header and the
WIP
from title once it's ready.In this PR
This is a big code-quality & tooling PR that normalizes the code, removes jquery dep, adds tools for publishing & developing, and should close the non-question issues, once it's setup. Normally, it would be wise to break so many changes up into a bunch of PRs, but everything sort of depends on each other or made it much easier to make the fix, and I wanted to get it all working right at once, so I just put it all together.
If any of this seems annoying, hard, unclear, wierd, or superfluous, I'm happy to chat in more detail about how it works, how to use it, or explain the reasoning behind the particularr change, as well as make changes to how it all fits together. Overall, it should make everyone's life easier, and the net-goal is higher quality code with less work.
npm version patch && npm publish
Commands
TODO
These need some discussion or work outside of this PR:
npm version patch && npm publish