Makes it usable from the cdnjs cdn, as well as from tool labs' wikimedia pp compliant CDN (tools.wmflabs.org/cdnjs). Some tools (like Aaron Halfak's labels) are already using OOJS / UI and have to bundle it in themselves.
Description
| Status | Subtype | Assigned | Task | ||
|---|---|---|---|---|---|
| Open | None | T133919 [EPIC] Protect end-user privacy by restricting non-consensual third-party browser interactions | |||
| Open | None | T103934 Convert all Toolforge tools to use cdnjs for static libraries and fonts | |||
| Resolved | DLynch | T106721 Submit OOjs UI and OOjs to cdnjs |
Event Timeline
Maybe they'll get wider exposure on Tool Labs too. Everyone uses Bootstrap these days.
Meh.
$ cdnjs-importer -c . ssh://gerrit.wikimedia.org:29418/oojs/core.git info [12:16.17 - 23.07.2015] Cloning ssh://gerrit.wikimedia.org:29418/oojs/core.git into /var/folders/3r/bm01bkmn2ndfrhsgkftrvfd40000gq/T/tmp-72257w7zMStv7iVna info [12:16.19 - 23.07.2015] Set the source path: /dist info [12:16.19 - 23.07.2015] Creating the version directory: ajax/libs/oojs/1.1.8 info [12:16.19 - 23.07.2015] Getting the library files. /usr/local/lib/node_modules/cdnjs-importer/lib/index.js:206 package.filename = files[0].replace(Path.join(repo.cwd ^ TypeError: Cannot read property 'replace' of undefined at /usr/local/lib/node_modules/cdnjs-importer/lib/index.js:206:52 at f (/usr/local/lib/node_modules/cdnjs-importer/node_modules/glob/node_modules/once/once.js:17:25) at Glob.<anonymous> (/usr/local/lib/node_modules/cdnjs-importer/node_modules/glob/glob.js:133:7) at Glob.emit (events.js:107:17) at Glob._finish (/usr/local/lib/node_modules/cdnjs-importer/node_modules/glob/glob.js:172:8) at done (/usr/local/lib/node_modules/cdnjs-importer/node_modules/glob/glob.js:159:12) at Glob._processReaddir2 (/usr/local/lib/node_modules/cdnjs-importer/node_modules/glob/glob.js:383:12) at /usr/local/lib/node_modules/cdnjs-importer/node_modules/glob/glob.js:346:17 at RES (/usr/local/lib/node_modules/cdnjs-importer/node_modules/glob/node_modules/inflight/inflight.js:23:14) at /usr/local/lib/node_modules/cdnjs-importer/node_modules/glob/node_modules/inflight/inflight.js:30:13
https://github.com/wiki-ai/wikilabels bundles OOjs and OOjs UI but would benefit from cdnjs.
Un-cookie-licking; I'm giving up on this given the complexities of submitting to cdnjs and their tool not seeming to work. Someone who gets value from this should probably take it up.
Started by doing as James did, and trying to use their suggested tools. Hit the same error. Filed an issue for it, and they seem to indicate that the importer tool needs major refactoring to catch up to recent changes to the cdnjs core before it'll be reliable again.
So, I now have these pull requests that I've manually put together without the tool, which I'm shepherding through their review:
Once these land, they're set up to auto-update off of our releases to npm, so we shouldn't have to worry about this further in the future, barring major changes.
OOjs is up: https://cdnjs.com/libraries/oojs
Still waiting on the reviews for OOjs UI.
OOjs UI: also merged: https://cdnjs.com/libraries/oojs-ui
There's a bit of discussion with them about whether our images in UI are suitably optimized, which may/may not produce some follow-up patch to our build process (which already does optimization prior to the npm publish). We shall see.