Giter VIP home page Giter VIP logo

Comments (7)

bgrins avatar bgrins commented on May 25, 2024

Alright, thanks for the heads up. What is the process for sending updated versions?

from tinycolor.

HoffmannP avatar HoffmannP commented on May 25, 2024

You fork the cdnjs-repo, insert the files (minimized and possibly with map-file, you can just take the command I used, shown in the pull request) and update the package.json (trivial, just update the version number). Then you open a pull request.
(or you message me and I can do that if you mind the hassle.)

from tinycolor.

yairEO avatar yairEO commented on May 25, 2024

The code in cdnjs isn't updated btw

from tinycolor.

HoffmannP avatar HoffmannP commented on May 25, 2024

@yairEO Thanks, I just opend a pull request

from tinycolor.

bgrins avatar bgrins commented on May 25, 2024

@HoffmannP from that issue (cdnjs/cdnjs#3416) it looks like you are using

uglifyjs tinycolor.js --source-map tinycolor.min.map --mangle -o tinycolor.min.js
and tinycolor.js was downloaded from the github repository

Not that it is so hard to run that, but I do have uglify set up with grunt (https://github.com/bgrins/TinyColor/blob/master/Gruntfile.js#L12). The options aren't quite the same, but we should definitely update them so that generating files for a cdnjs compatible PR is as easy as running a git checkout TAG grunt build (or maybe we could add a grunt uglify that doesn't affect the doc files).

from tinycolor.

HoffmannP avatar HoffmannP commented on May 25, 2024

for me it is always

git fetch upstream
git rebase mater/upstream
cd ajax/lib/tinycolor
mkdir $newVersion
cd $newVersion
wget https://raw.githubusercontent.com/bgrins/TinyColor/master/tinycolor.js
uglifyjs tinycolor.js --source-map tinycolor.min.map --mangle -o tinycolor.min.js
rm tinycolor.js
cd ..
# manually update version number in package.json to $newVersion
# could probably be automated using i.e. sed
git add $newVersion
git add package.json
git -m "Update tinycolor $newVersion"
git push
# manually open PR

There are a few steps that should/could be automated, the uglify process is not the problem, especially as I usually don't fetch the hole tinycolor-rep

from tinycolor.

bgrins avatar bgrins commented on May 25, 2024

The problem is that if you wget https://raw.githubusercontent.com/bgrins/TinyColor/master/tinycolor.js, this may be different from the tagged version of that lib (which could lead to all kinds of inconsistencies). What I would suggest is something like this (this may not be verbatim commands, but pretty close to the idea):

For TinyColor

git fetch upstream
git rebase mater/upstream
git checkout 0.11.2
uglifyjs tinycolor.js --source-map tinycolor.min.map --mangle -o tinycolor.min.js
git checkout master

For cdn

git fetch upstream
git rebase mater/upstream
cd ajax/lib/tinycolor
mkdir 0.11.2
cd 0.11.2
cp /path/to/tinycolor/dist/tinycolor.min.js . # Copies in based on actual tagged release this way
cp /path/to/tinycolor/dist/tinycolor.min.map .
cd ..
git add 0.11.2
cp /path/to/tinycolor/package.json .
git -m "Update tinycolor $newVersion"
git push
# manually open PR

There are a few steps that should/could be automated, the uglify process is not the problem, especially as I usually don't fetch the hole tinycolor-rep

Still, if we had a grunt package command that made a folder called dist/0.11.2 and copied in the min.js and min.map files, then all you would have to do is copy that folder + the current package.json file into the cdnjs repo (which would get this down to many fewer steps)

from tinycolor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.