Closed simonihmig closed 6 years ago
@stefanpenner mind having another look if that makes sense so far? Any thoughts?
we can bikeshed the name abit.
_ember-cli
_ember
_build
<- my preference so far_analyze
I would like to slot in more utilities at this namespace, utilities such as heimdall viz, and some tools merely an idea. So whatever we do, lets try to make it somewhat future friendly.
but otherwise the above LGTM
IIUC the idea is to have different addons mount their middleware under a common namespace (that needs to be distinct from any user's routes, hence the underscore), like _build
, right?
This sounds good. I just played a bit with the new vue-cli, they have put together quite a nice web UI layer... (see https://cli.vuejs.org/guide/cli-service.html#using-the-binary). Maybe ember could go into that direction somehow/sometime as well? Certainly out of scope for this discussion here, rather something for a bigger RFC. But assuming there is a future for something like this, I would guess this could integrate not only build tools. E.g. a way to run the given blueprints using a web UI. Or installing addons.
So I think I would prefer _ember
, as that could map to known CLI commands (or at least be more "open-ended"):
_ember/generate
..._ember/install
..._ember/test
_ember/bundle-analyzer
BTW, I was thinking of renaming this addon to something like bundle-analyzer, as that is how these tools are known in the wider (webpack/react) ecosystem, and is more agnostic of the underlying implementation (concat)...
BTW, I was thinking of renaming this addon to something like bundle-analyzer, as that is how these tools are known in the wider (webpack/react) ecosystem, and is more agnostic of the underlying implementation (concat)...
I agree, concat-analyzer
is the kind of name you often can't remember...
Overview
/_analyize
URL/_analyze/compute
broccoli-concat-analyser
). It uses theCONCAT_STATS_PATH
if available (as ofbroccoli-concat
3.6.0) to tellbroccoli-concat
to output in a temporary folder. Once that's ready, it returns a redirect response back to/_analyze
sane
based file watcher invalidates the cache when a .json output file is changed. A subsequent reload by the user would trigger the above process (loading page, stats generation, stats display) againRemaining issues
CONCAT_STATS
by default (https://github.com/simonihmig/ember-cli-concat-analyzer/blob/master/index.js#L21). Doing that for the first/_analyze
would be better, asbroccoli-concat
would not need to generate the stats files all the time by default. A test to set the env var and triggering a rebuild (by touching e.g. app.js) did not work out, as setting theCONCAT_STATS
after the plugin instantiation is too late for the current implementation in the constructor (see https://github.com/broccolijs/broccoli-concat/blob/master/concat.js#L28-L32). Enabling that would require some further changes there... Fixed in https://github.com/simonihmig/ember-cli-concat-analyzer/commit/c9b27f257c6bbfb7ba58a8425db46865e1ddeaabTo Do