angular-dialog-service icon indicating copy to clipboard operation
angular-dialog-service copied to clipboard

Loading from cdnjs

Open derekperkins opened this issue 11 years ago • 1 comments
trafficstars

I'd love to use this off of cdnjs. https://github.com/cdnjs/cdnjs

Do you already deliver to npm? cdnjs has a setting to automatically pull from npm every 4 hours, so after an initial setup, hopefully you can just forget about it. :) Thanks for a great plugin!!

(from cdnjs) Enabling NPM auto update

We automatically update libraries that are also hosted on NPM e.g. Lodash.

This script runs automatically every 4 hours

Update the package.json and configure it as below and submit a pull request. // Lodash package.json // ... "npmName": "lodash", "npmFileMap": [{ "basePath": "/dist/", "files": [ "*" ] }], // ... npmName should map to the name of the library on NPM npmFileMap is a white list of files to take from the NPM tarball and host on the cdn basePath will be ignored when copying over to the cdn files is a pattern matcher that you can select many files with

The above example looks in the tarball whose structure might look like

dist/lodash.js dist/lodash.min.js README It then will look for dist/* which will find the two files inside the dist folder. It will now copy it over to cdnjs but without the dist path. Such that they will end up. ajax/libs/lodash.js/2.0/lodash.js

derekperkins avatar Feb 07 '14 22:02 derekperkins

Thanks for complements, I've been getting a lot of good feedback and glad everyone has enjoyed using this.

I didn't created the "package.json" and "grunt" files for the repository, I merged them from another user's helpful input, so I'll look into getting this on listed on NPM, thanks for the examples.

It is registered with Bower and tested with "bower install angular-dialog-service" for the 3.1.0 version, if you use that.

m-e-conroy avatar Feb 10 '14 15:02 m-e-conroy