On 2016-04-14 06:13, Matthew Flaschen wrote:
What's the best way to build OOjs UI locally into the MW lib directory
while developing?

I'm having two issues:

1. The README.md says:

"Install dev dependencies and build the distribution files:<br/>`$ npm
install`"

This does not actually build to dist for me.

Sorry, it seems we forgot to update this after https://gerrit.wikimedia.org/r/#/c/277814/ . The build doesn't happen by itself anymore.


I then tried:

npm run-script publish-build

That partly works but has many errors:

https://phabricator.wikimedia.org/P2903

However, it apparently creates the key files.

This definitely should work. `npm run-script publish-build` just runs `grunt publish-build`.

For development, you'll probably want to run `grunt build`, which does the same thing as `grunt publish-build` but doesn't generate minified files. It looks like the errors you're getting (no idea about them, sorry) are mostly related to the minification.

There's also `grunt quick-build`, which additionally doesn't generate PNG graphics, and doesn't take so incredibly long to run.


2. I see update-oojs-ui.sh, but it looks like it's only intended for
when the OOjs UI change is already published.

I had to hack it up with:

npm install '/home/matthew/Code/Wikimedia/oojs/oojs-ui/'

which seems to basically work.

Yes, update-oojs-ui.sh is for when we release a new OOjs UI version.

For development, I just copy-and-paste everything from the dist/ directory over the resources/lib/oojs-ui/ directory in MediaWiki.

(This doesn't update the JSON icon definition files, but that's usually not a problem unless you want to test icon changes, in which case you'll need to copy these by hand too…)


If there is not yet a proper way to do this, I'll probably add this as
an option.

This should be documented, probably at
https://www.mediawiki.org/wiki/Using_OOjs_UI_in_MediaWiki .

Yeah, the current state is pretty silly… I think we just got used to it and no longer question how horrible it is.


--
Bartosz Dziewoński

_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to