Closed brianbest closed 4 years ago
Sure... it will be zimjs - just created an organization...
Woot! On Mon, May 1, 2017 at 1:13 PM Dan Zen notifications@github.com wrote:
Sure... it will be zimjs - just created an organization...
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/danzen/zimjs/issues/8#issuecomment-298364315, or mute the thread https://github.com/notifications/unsubscribe-auth/AB-iPMKKi4ThaC_utQbdZWNgKDm_x_D_ks5r1gS1gaJpZM4NDbif .
Just started the package... continuing to work through details.
@danzen let me know if you need help with this 😬
Sure @neo I will message you on the FB...
Okay - we have a plan for the new year... for ZIM HEP (7).
Hi @brianbest, @neo has been working on this a little - would you like to take a look https://github.com/danzen/zimjs/compare/master...neo:master and offer any suggestions. He says there is still work to do and points to an issue that CreateJS is not set up either - CreateJS 2 apparently will be. We are trying to make it so that ZIM can still function the way it does now with script tags to the libraries - or be brought in with includes, etc. Any recommendations or even a confirmation that it works... would be great! Thanks and hope all is well!
another solution would be we wait for createjs to support npm first as zim depends on createjs anyway
Any progress on this? Can I npm install zimjs
yet?
createjs
is on npm ... https://www.npmjs.com/package/createjs
Thanks @josiahbryan - will see what we can do for version 10 due out in a beta hopefully this week.
@danzen Hi Dan, I also really need zim on npm.. It would be great if you could make that happen for version 10 :)
Well... got stalled again - I just don't understand this stuff. It seems like the CreateJS version on NPM just lets you download all the CDN files - and is not in a module format. So, when I try and do a test page, it does not know how to import CreateJS. So should we be trying to do the same - just let NPM give you the latest ZIM file - not in module format? And you would still use script tags on your main file to bring in CreateJS and ZIMjs? If anyone has any advice that would be great. I have a message out to @neo but I know he is busy with a very active job...
This is hard if not impossible as I don't think the dependency createjs
is done the right way on npm.
so we would either need to do a fork of createjs and fix it on their side first, or wait until they fix their npm implementation.
Perhaps someone can confirm that the CreateJS npm is not giving us what we need - from the looks of it... that was my conclusion but I could be wrong. If I could get a confirmation... then perhaps working through that on their github would help.
the line before this mentions that it "can not yet be used with RequireJS, CommonJS, etc." and I think this issue also kinda describe the problem, not 100% sure if that's the problem tho: https://github.com/CreateJS/Combined/issues/12
Is it worth it to anyone to have a ZIM npm that just gives you the CDN version? I don't think so, I mean, I would rather not have to update another location just for that... so the advice would be to work with CreateJS to get them in proper format - and NEO, is that what you started to do by forking CreateJS, etc. did you feel you got it into a format that actually worked? When I tried to run the code you put together, I don't think I got it working....
Had an idea... we like to run our CreateJS anyway because we have some current things in there not on their CDN - so... why don't we adjust CreateJS so it can be read like a module and ZIM so it can be read like a module and include them both in the same NPM as they have to work together anyway. Does that sound like a good plan?
Okay.. ZIMjs is on NPM as a test. npm install zimjs It makes its dependency @danzen/createjs and both are running as modules but each is just running a test function. I am now planning on putting all of ZIM and all of Createjs in place of the zim and createjs test objects. When I tried, I could not run from node because there is no window and no console, etc. So my question is... once it gets browersfied, or whatever will it all work? I have some global functions like zog() and zid() - since they are not stored on the zim object I suspect they will not work? Is there a work around? I also use them in hundreds of places inside ZIM as global functions. Thoughts? I guess the answer is reprogram them - now that we use ZIM without the namespace, the same system would still let them be global.
ZIM is on NPM. Was able to get it running using Browserify. Here are the steps:
Using ZIM with NPM and Browserify http://browserify.org/
Assuming NodeJS installed with NPM. https://nodejs.org/
Open Node command prompt and get Browserify: npm install -g browserify Marvel at the 139 packages used to make Browserify - arrrg.
Get ZIM (which gets CreateJS too) npm install -g zimjs
Change to the node_modules/zimjs/ directory and: browserify code.js -o bundle.js
run code.html in browser
Can we use ZIM as a React component now? For example wit Gatsby.js etc.
Hi @ajerni - I am not sure - please try it if you have a moment and let us know. We had a some people using ZIM with React and they got it working. If you want, you are welcome to come in to https://zimjs.com/slack and ask the folks. We would love to have you there!
Here is what I try to do: https://github.com/ajerni/gatsby-zim
Excellent presentation... will have a look - it would be cool to get ZIM working with PWA.
I still don't think zim is a clean npm module at the moment given the need for some of those manual build steps.
I would suggest perhaps putting all necessary build steps into a postinstall
script to make the zim install process seamless and just work
like most mature npm modules.
@iyobo - that would be great - just not sure what is supposed to happen. For those that work with node it is probably a simple thing so you are welcome to let us know what to do. Let us know if we can help in any way. If you want to work "off-line" with us... we have a Slack channel at https://zimjs.com/slack and a #technology topic that we can add you to. Cheers.
We have now updated our npm to be more robust. https://www.npmjs.com/package/zimjs. There is now a repo of templates for Vue, Svelte, React and Angular here https://github.com/yoanhg421/zimjs-templates
Hey @danzen can you add Zim to npmjs registry?