Commit graph

15 commits

Author SHA1 Message Date
joakin facf307918 Tooling: Make diffing in check-built-assets verbose
So that it is easier to diagnose what the differences are between the
commited built files and the ones compiled for the check.

Change-Id: Id5394bda910c8218123a87d4604351fe5ae95d1e
2017-03-02 16:18:13 +01:00
joakin 8a2f19d593 Tests: Up the min version of the node qunit runner
It has important improvements, and we don't want dev to use a previous
version.

List of changes on the runner:
* 1.0.6 Add globals to window too
* 1.0.5 Don't reorder or run tests in parallel
* 1.0.4 Don't autostart the tests, they are manually started
* 1.0.3 Invoke sandbox restore after hooks have been called
* 1.0.2 Default fake timers and server to false

See https://github.com/joakin/mw-node-qunit/commits/master

Change-Id: Ic3283c99eb374bc9f85c703ef0b55f875d527e0b
2017-02-22 12:13:34 +01:00
joakin 33c05394f4 Set up qunit running in node to migrate tests to commonjs
In order to run qunit tests on sources that use common.js modules, set
up infra to run qunit tests in the node cli when running:

    npm run test:node

Changes:
* Add npm script test:node that runs the tests
* Run node tests on CI (npm test)
* Add a qunit node test runner: mw-node-qunit
* Migrate a test from the root hierarchy and another one from the nested
  one to prove it works (globs fail otherwise)
  * reducers/settings.test.js to node qunit to prove it works
  * counts.test.js to node qunit to prove it works

Change-Id: I55d76b7db168f3745e0ac69852c152322ab385c3
2017-02-20 20:01:01 +01:00
joakin c593ed3502 CI: Check built assets are up to date with sources
When running the CI npm job in jenkins, make sure to check that the
compiled assets from the bundler are up to date with the sources.

That way, CI will not verify if the assets commited are not up to date
so that we don't have out-of-sync sources and built assets.

Change-Id: I56bc0097f5b4fa6c9b7afa3ae14b7db4ab480a94
2017-02-14 18:39:38 +01:00
joakin 45046da7f1 Tooling: Add npm start script for development mode
Run webpack in watch mode for development. Scripts are documented in
a followup commit in the README.

Change-Id: Id1e2f8b8578169eee53a5e4f8c468d5426d4c2ea
2017-02-14 18:39:38 +01:00
jdlrobson f0f462ee0d Redux and redux-thunk now packaged inside ext.popups
Until this appears in core it makes sense to package it up as
part of ext.popups resource loader module.

Version numbers from npm are pinned to exact versions to control the
upgrade path of the libraries instead of leaving it to semver on
developers machines.

Bug: T156333
Change-Id: I33368ecc3c8e911d96f846669bcd831c182749f2
2017-02-13 14:15:30 +01:00
jdlrobson 49df4b9572 Tooling: Begin to use webpack for JS code generation
Generate changeListeners via webpack
We now use a build folder to build the JavaScript for
our ResourceLoader modules. This is the first change
in a line of changes.
A source map is provided for debug support.

Bug: T156333
Change-Id: I771843d1ddb4b50adedc3fa53b30c2f1d8a76acb
2017-02-13 13:42:22 +01:00
joakin 4ca333e577 Remove jshint/jscs, add eslint and stylelint
...with the wikimedia presets.

For automatically fixing most of the JS lint problems run

      grunt eslint:fix

Some rules of stylelint were disabled given they cause problems with
existing popups code (like no id selectors for example).

Change-Id: I2153047c3ddbea50572dd329989088bb20787515
2016-12-16 13:35:34 +01:00
jhobs 046d12f51b Update linting and enable command line QUnit
You can use `grunt watch` now!

Changes:
 * Re-enable QUnit (but ignore legacy tests)
 * Add a sample QUnit test
 * Add ability to run QUnit via `grunt watch` or `grunt test`
 * Move linting to `grunt lint` task
 * Add Redux to globals in linter

Change-Id: Ie4a65a8a66773d6472b3d73257267d18027ff3c3
2016-11-08 13:56:17 -05:00
Kunal Mehta 15336e307a build: Updating development dependencies
* grunt-jsonlint: 1.0.5 → 1.0.7

Change-Id: I0fd966cf85bf636e6f91b86582c53bcb833561dc
2015-12-29 11:48:27 -08:00
Paladox a39af9b58e build: Updating development dependencies
* grunt-contrib-jshint: 0.11.2 → 0.11.3
* grunt-jsonlint: 1.0.4 → 1.0.5

Change-Id: Ide62f02ded3a74b94454fd98d4ca7b9f20470883
2015-10-26 08:58:24 +00:00
Kunal Mehta 8b27b96d3a build: Updating development dependencies
* grunt-banana-checker: 0.2.2 → 0.4.0

Change-Id: I40eacb11872f82d23c7324237fa7b1c78b11dd3a
2015-10-11 11:56:05 -04:00
Prateek Saxena 6eef4f325b Add jscs and jshint tasks to the Gruntfile
Adds the jscs and jshint packages for development and their tasks in
Grunt. Also fixes all the code convention errors.

Change-Id: If1c9dfdbe22d4912d78b6a51b1292866970a85cc
2015-09-04 13:57:52 +05:30
Prateek Saxena 07d76da27e Setup jsduck to run on 'npm run doc'
Change-Id: If49922acd1d8af9caac54ed46360ff6c780833ce
2015-08-03 15:54:25 +05:30
Kunal Mehta 47d5daf74d build: Configure banana-checker and jsonlint
Change-Id: Id3f1d601f6b99e9646c7a1c6b430b1dd777e952b
2015-06-19 22:09:03 -07:00