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

[WIP] Replace bower dependencies with npm packages #107

Conversation

raphamorim
Copy link
Member

@raphamorim raphamorim commented Jun 10, 2016

Ref: #93

@raphamorim
Copy link
Member Author

raphamorim commented Jun 24, 2016

Hey @leobalter @gnarf @mgol

I'm having a lot of problems to implement this PR.
One of these is: the lack of support for npm custom packages based on url or git` repos.
So implementations like:

"devDependencies": {
    "jquery-1.5.0": "http://code.jquery.com/jquery-1.5.js",

...doesn't work.

"devDependencies": {
    "jquery-1.5.0": "git+https://github.com/jquery/jquery#1.5.0",

...doesn't work too :/

BTW: I'm using 3.5.3 as npm version.

@raphamorim
Copy link
Member Author

I think one viable solution is to create a preinstall script to download all jquery-versions and place in node_modules or other place.

What do you think?

@leobalter
Copy link
Member

maybe you should copy these files from http://code.jquery.com

@mgol
Copy link
Member

mgol commented Oct 26, 2016

Since we keep those files in the repository anyway, I think a good solution would be to create a task that would get a jQuery version (VERSION below) as a parameter and would:

  1. Check if https://unpkg.com/jquery@VERSION/dist/jquery.js exists; if not, print an error message & finish. Otherwise, go to the next step.
  2. Create an external/jquery-VERSION directory.
  3. Download https://unpkg.com/jquery@VERSION/dist/jquery.js & https://unpkg.com/jquery@3.1.1/LICENSE.txt & save both to external/jquery-VERSION/.

Once such a task exist, we could invoke it when we need a new version to be added. If we felt really ambitious we could even check for all versions newer than the newest ones on https://unpkg.com and download all the missing major/minor updates in their latest patch version, removing older patch releases (so e.g. 3.0.0 & 3.1.1 are fine but 3.1.0 should be removed).

We could then remove the whole Bower setup & the bowercopy task.

@raphamorim
Copy link
Member Author

raphamorim commented Oct 26, 2016

I'll proceed with @mgol solution (creating a node script to do it) 👍

@raphamorim
Copy link
Member Author

raphamorim commented Oct 26, 2016

@mgol I've checked and unpkg doesn't have all jQuery versions.

jquery-color use for test the following jquery versions: 1.5.2, 1.6.4, 1.7.2, 1.8.3, 1.9.1, 1.10.2, 1.11.3, 1.12.4, 2.0.3, 2.1.4, 2.2.4, 3.0.0 and 3.1.1.

The Unpkg only have versions above of 1.11.3

@mgol
Copy link
Member

mgol commented Oct 27, 2016

unpkg is a CDN sharing npm packages and jQuery has been published to npm only since 1.11/2.1.

The old versions are already there, though, the script will download future versions which will all be on npm so this shouldn't be a problem.

@mgol
Copy link
Member

mgol commented Apr 1, 2017

@raphamorim will you have time to finish the PR?

@raphamorim
Copy link
Member Author

raphamorim commented Apr 2, 2017

Yeah, sorry for delaying it. I'll see it til next friday :)

@jsf-clabot
Copy link

jsf-clabot commented Apr 8, 2017

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.

@raphamorim
Copy link
Member Author

raphamorim commented Apr 8, 2017

@leobalter, @mgol.
I was wondering if this PR is worth continuing. It would be valid to continue if we had followed the path using NPM or bower, but they are not yet ripe for it.

But in the end, we'll exchange a download script for another download script.

@mgol
Copy link
Member

mgol commented Jul 26, 2017

@raphamorim

It would be valid to continue if we had followed the path using NPM or bower, but they are not yet ripe for it.

I'd remove yet from this statement as npm doesn't plan to add this feature.

I think this PR would be worth to finish to get rid of the deprecated bower, though that's true that we'll have to maintain the download script ourselves then.

What do you think?

@raphamorim
Copy link
Member Author

Yeah, make sense to me.
Also: I'm closing this PR in favor of it.

@raphamorim raphamorim closed this Jul 26, 2017
@raphamorim raphamorim deleted the feature/replace-bower-dependencies-with-npm-packages branch July 26, 2017 12:24
@mgol
Copy link
Member

mgol commented Jul 26, 2017

Also: I'm closing this PR in favor of it.

In favor of what?

@raphamorim
Copy link
Member Author

Sorry, I expressed myself badly haha
In favor of:

though that's true that we'll have to maintain the download script ourselves then.

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

Successfully merging this pull request may close these issues.

None yet

6 participants