Skip to content
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

Make it easy to find dist (build) files. #150

Closed
2 tasks done
dwiyatci opened this issue Jul 9, 2015 · 42 comments
Closed
2 tasks done

Make it easy to find dist (build) files. #150

dwiyatci opened this issue Jul 9, 2015 · 42 comments

Comments

@dwiyatci
Copy link
Contributor

dwiyatci commented Jul 9, 2015

Link prominently to all dist options in the README:

  • CDNJS
  • Bower (but recommend npm instead)

Original message

Hi guys,

could we have consistency of always having the dist file(s) included for each release? I mean, in the latest release v2.1.0, for example, it doesn't have this dist folder which contains stampit.js and stampit.min.js.

Cheers

@troutowicz
Copy link
Member

The distributables are available through cdnjs, is there a particular reason you need them in the projects repo?

https://cdnjs.com/libraries/stampit

@dwiyatci
Copy link
Contributor Author

dwiyatci commented Jul 9, 2015

I checked the cdnjs earlier. Not all versions (including the latest) available there. No particular reason; just to keep my lib always updated to the latest.

@troutowicz
Copy link
Member

The distributables on cdnjs are supposed to be updated automatically at npm publish iirc. Looks like something is broken.

@nkbt any ideas?

@bekos
Copy link

bekos commented Jul 9, 2015

We could use the dist folder if we are using stampit through bower instead of cdnjs.

@nkbt
Copy link
Contributor

nkbt commented Jul 9, 2015 via email

@ericelliott
Copy link
Contributor

Questions:

  • What is the current official release? (should this be in the README?)
  • What is the current published release on npm?
  • What is the latest build available on CDNJS?
  • Do we link prominently to the CDNJS releases in the README?

@sethlivingston
Copy link
Contributor

Current release is 2.1.0 (https://github.com/stampit-org/stampit/releases).

Current published release on NPM is 2.1.0 (https://www.npmjs.com/package/stampit)

Latest available build on CDNJS is 2.0.3 (https://cdnjs.com/libraries/stampit)

We do not link prominently to CDNJS in the README.

We do need to provide a /dist/ folder, at the very least for bower. Bower was built to prevent developers from having to fetch files from all over the planet, including from CDNJS. IMHO it also just makes sense to have a committed copy of stampit.js and stampit.min.js included with every release we tag.

@ericelliott
Copy link
Contributor

IMHO it also just makes sense to have a committed copy of stampit.js and stampit.min.js included with every release we tag.

Build artifacts are usually not checked into source control, but I also don't see a problem with this for small library projects

sethlivingston pushed a commit to sethlivingston/stampit that referenced this issue Jul 13, 2015
@sethlivingston
Copy link
Contributor

The Bower distribution is up and running with all of the releases: https://github.com/stampit-org/stampit-bower, and we have re-registered our Bower package to point there.

@ericelliott
Copy link
Contributor

Before you use this distribution, consider using the NPM distribution instead; Bower usage is declining rapidly.

<3

@ericelliott ericelliott changed the title Dist (build) files not always included in the release Make it easy to find dist (build) files. Jul 22, 2015
@ericelliott
Copy link
Contributor

Let's get this issue closed. I think all we need to do now is link prominently to the dist options in the README.

@koresar
Copy link
Member

koresar commented Jul 22, 2015

Wonderful! Thank you very much.

On Thu, 23 Jul 2015 03:27 Eric Elliott notifications@github.com wrote:

Before you use this distribution, consider using the NPM distribution
instead; Bower usage is declining rapidly.

<3


Reply to this email directly or view it on GitHub
#150 (comment)
.

@dwiyatci
Copy link
Contributor Author

Cool! Many thanks to @sethlivingston, @ericelliott, and the guys. OK, from now on: npm FTW!!

I guess the link to cdnjs would be pretty much useful if someone (like me) wants to fiddle around with Stampit in some JS playground like https://jsfiddle.net/. 👍

@sethlivingston
Copy link
Contributor

Let's get this wrapped up by addressing CDNJS:

  1. Who is doing this right now?
  2. It seems to make sense that we post the Bower distribution (UMD) to CDNJS, no?
  3. Would you like me to take over this, too? I'd be happy to.

@ericelliott
Copy link
Contributor

@sethlivingston CDNJS should have a UMD, but aren't we already compiling a UMD for CDNJS? =)

@koresar
Copy link
Member

koresar commented Jul 26, 2015

I believe @sethlivingston made a rational proposal. CDNJS better contain UMD modules, not the CommonJS as it is now.

Or CDNJS better be CommonJS thing?

@troutowicz
Copy link
Member

CDNJS needs to host the UMD modules.

@koresar
Copy link
Member

koresar commented Jul 26, 2015

@sethlivingston Can you address the posting the bower disctibution to CDNJS please?
We'd be happy to have this finally sorted. :)

@sethlivingston
Copy link
Contributor

I created a PR with CDNJS (cdnjs/cdnjs#5201) that tells CDNJS to pull from stampit-org/bower. When the PR has been approved, I will (finally!) close this issue.

@sethlivingston
Copy link
Contributor

The PR has been merged. The UMD version of stampit 2.1 will be available on CDNJS in the next 24 hours, and no further action is required for CDNJS. When we update stampit-bower, CDNJS will be updated within an hour.

@dwiyatci
Copy link
Contributor Author

dwiyatci commented Aug 1, 2015

Works like a charm in JSFiddle now. Many thanks! 🤘

@sethlivingston
Copy link
Contributor

Glad to hear, @dwiyatci, and thank you for testing that.

@koresar
Copy link
Member

koresar commented Aug 2, 2015

Wonderful ending!

@harm-less
Copy link

harm-less commented Mar 2, 2017

The Bower release repo is down/no longer supported?

@koresar
Copy link
Member

koresar commented Mar 2, 2017 via email

@harm-less
Copy link

Not according to Bower it seems. Bower dependency line in bower.json:
"stampit": "3.0.0"

Result in cmd:

C:\CRS>bower install
bower stampit#3.0.0         not-cached https://github.com/stampit-org/stampit-bower.git#3.0.0
bower stampit#3.0.0            resolve https://github.com/stampit-org/stampit-bower.git#3.0.0
Username for 'https://github.com':
Password for 'https://github.com':

@koresar
Copy link
Member

koresar commented Mar 2, 2017

Could you please explain what does that output mean? I'm not a bower user.

@harm-less
Copy link

Sure. It seems like the "stampit" package is linked to the wrong repo.

I'm not sure if I'm right, but it seems you need to unregister/re-register to the https://github.com/stampit-org/stampit repo.

@koresar
Copy link
Member

koresar commented Mar 2, 2017

Since you're specifying the strict stampit version ("3.0.0"), would copying a dist file help?
https://unpkg.com/stampit@3.1.2/dist/

@koresar
Copy link
Member

koresar commented Mar 2, 2017

Ok. I'll try reregister in 24. It's midnight here.

@harm-less
Copy link

Sure thing. I took your advice and used it like this:
"stampit": "git://github.com/stampit-org/stampit.git#3.1.2"

This works!
Without the repo link it doesn't, even with a version of 3.1.2

So I'm pretty sure a re-registering will work. Doesn't seem a bower.json in the repo is required, but I'm not sure about that.

@koresar
Copy link
Member

koresar commented Mar 2, 2017 via email

@harm-less
Copy link

Yeah, I hear that more often, but I'm working often with tasks like https://github.com/stephenplusplus/grunt-wiredep.

So maybe I need to switch to an NPM variant, but I don't really see why Bower is such a bad thing actually.

@koresar
Copy link
Member

koresar commented Mar 5, 2017

Hi @harm-less
Sorry for the late reply.

I'm thinking of staying off bower specific repo/support because bower is so cool that you can install any package like this: reduxjs/redux#1181 (comment)

In stampit's case it's like this:

$ bower install stampit=https://npmcdn.com/stampit@3/dist/stampit.umd.js
or
$ bower install stampit=https://npmcdn.com/stampit/dist/stampit.umd.min.js

Or maybe like this (I didn't try yet):

$ bower install stampit=https://unpkg.com/stampit@3/dist/stampit.umd.js
or
$ bower install stampit=https://unpkg.com/stampit/dist/stampit.umd.min.js

AFAIK bower is mostly used for the browser side package management. Is it your case too?

@koresar
Copy link
Member

koresar commented Mar 5, 2017

Created an anniversary PR #300 to explain how to install stampit via bower.

@koresar
Copy link
Member

koresar commented Mar 5, 2017

@harm-less Looks like I fixed bower. Now bower install stampit will download latest stampit version. :)

@harm-less
Copy link

harm-less commented Mar 5, 2017

@koresar Thanks a bunch, Bower has been revived (somewhat)!

I'm indeed using Stampit within a browser. So Bower is a more logical choice indeed.

However, when I temporarely started using 3.1.2 with NPM, I ran into a few problems this weekend (mostly the compatibility with Karma and the polyfill for Object.assign I couldn't get to work). I didn't have time to figure it all out, but it made me look at previous versions of Stampit which are less modern. Using Stampit 2.0.3 (the latest 2.* had most of the same issues I was having already) all my problems vanished. But I now realise 2.0.3 isn't in the Bower repo you brought back to live :(

It would of course be best if the Bower repo also natively supported the most used/stable versions of Stampit there (like Angular does), but I think that will not be handy for your guys to maintain.
I used your advice and came up with this solution:
"stampit": "https://npmcdn.com/stampit@2.0.3/dist/stampit.js"
This works and I'm getting the result I expect.

Just an FYI, at one of my own repos I have a Grunt task (task info) that does the releasing including the necessary changes for NPM and Bower automatically. Maybe an idea for the future if you want to keep it a bit easier to maintain.

Last question, why is 2.0.3 much bigger in size than 3.1.*? A large optimization?
2.0.3 = 7.0KB
2.1.0 = 1.5KB
3.1.2 = 1.9KB

P.s.: Congrats on the anniversary 👍

@koresar
Copy link
Member

koresar commented Mar 5, 2017

I revived the bower stampit at ~ 2017-03-05T13:00:00Z UTC
Have you tried bower install stampit after that time?

If you want me to publish all the previous stampit versions (including v2.0.3) to bower - tell me.


It would of course be best if the Bower repo also natively supported the most used/stable versions of Stampit there

AFAIK it does now (starting yesterday).


We have a build system via rollup which generates few kind of builds. Check these out: https://unpkg.com/stampit@3.1.2/dist/
And we have the build script which is used to create bower releases.
So, it's pretty automated and easy to do bower releases for me.

@harm-less
Copy link

The master works fine, but you can't get another version:

C:\CRS>bower install stampit#2.0.3
bower stampit#2.0.3         not-cached https://github.com/stampit-org/stampit-bower.git#2.0.3
bower stampit#2.0.3            resolve https://github.com/stampit-org/stampit-bower.git#2.0.3
bower stampit#2.0.3       ENORESTARGET No tag found that was able to satisfy 2.0.3

Nice build script! So if you can make some versions available as tags in the Bower repo, Bower will be able to pick it up for you.

@koresar
Copy link
Member

koresar commented Mar 6, 2017

Ah, I see what you mean. Sorry!!! I forgot to push the git tags. :(
Should be good now :)
Here is the list of bower versions:

> git push --follow-tags
Counting objects: 7, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (7/7), done.
Writing objects: 100% (7/7), 1.14 KiB | 0 bytes/s, done.
Total 7 (delta 0), reused 0 (delta 0)
To https://github.com/stampit-org/stampit-bower.git
 * [new tag]         v1.0.2 -> v1.0.2
 * [new tag]         v1.1.0 -> v1.1.0
 * [new tag]         v1.2.0 -> v1.2.0
 * [new tag]         v2.0.2 -> v2.0.2
 * [new tag]         v2.1.0 -> v2.1.0
 * [new tag]         v3.0.6 -> v3.0.6
 * [new tag]         v3.1.2 -> v3.1.2

Now this works fine: bower install stampit@2.0.2

Please try again.
Sorry again. I'm so new to this bower thing :)

@harm-less
Copy link

Awesome! Now it works like Bower (and I) expects ;)
I'm only missing 2.0.3, but I'll use 2.0.2 instead, that's probably no problem.

So far my experience with Stampit has been great! In practice it luckily makes a lot of sense as it seemed like it had a steep learning curve when I was reading about it. So thanks for this awesome library, you've gained a prototypal enhousiast ;)

@koresar
Copy link
Member

koresar commented Mar 6, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants