tomwayson / opendata-chart-utils

Utility functions that may be useful when developing ArcGIS web apps
Apache License 2.0
2 stars 0 forks source link

Try webpack/babel instead of rollup/buble #14

Open tomwayson opened 7 years ago

tomwayson commented 7 years ago

Rollup/buble make it hard to test in a browser (i.e. w/ Karma vs tests that execute in node like w/ Ava). The crux of the problem is this https://github.com/jlmakes/karma-rollup-preprocessor/issues/17

For that reason, I started running the tests off the transpiled build output. That works, but it requires adding concurrently to run builds on changes and run karma in watch mode. A bigger problem is that the tests themselves are ES6, so they have to be transpiled too, and there's not a karma preprocessor for buble, so I'm using the one for babel (see #12).

Ultimately the target consumers of this library are ember addons, which use babel to transpile, so might as well try to use the same preset, etc here.

So, at a high level:

  1. replace rollup/buble w/ webpack/babel and verify that we can get a reasonable build size
  2. try running tests w/ https://github.com/webpack-contrib/karma-webpack
tomwayson commented 7 years ago

See also:

http://www.syntaxsuccess.com/viewarticle/writing-jasmine-unit-tests-in-es6

tomwayson commented 7 years ago

Note looks like the latest ember-cli-babel is now using babel-preset-env