Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modifying ast plugin should bust cache #84

Closed
asakusuma opened this issue Aug 1, 2016 · 3 comments
Closed

Modifying ast plugin should bust cache #84

asakusuma opened this issue Aug 1, 2016 · 3 comments

Comments

@asakusuma
Copy link

asakusuma commented Aug 1, 2016

Given an addon that has an htmlbars-ast-plugin, cached htmlbars files should be busted when the plugin is modifyed. This does not happen. I have to delete the async cache.

// Changing this file should bust the cache
var ReWriteStuff = require('re-write-stuff');

module.exports = {
  name: 'my-addon',
  setupPreprocessorRegistry: function() {
    registry.add('htmlbars-ast-plugin', {
      name: 're-write-stuff',
      plugin: ReWriteStuff
    });
  }
};
@rwjblue
Copy link
Member

rwjblue commented Aug 2, 2016

@asakusuma - Confirm. I would like to do the same thing that we decide on in babel/broccoli-babel-transpiler#89.

@stefanpenner
Copy link
Contributor

stefanpenner commented Aug 2, 2016

i think the API should change to:

registry.add('htmlbars-ast-plugin', {
  name: 're-write-stuff',
  plugin: { name: 're-write-stuff', relativeTo: __dirname }
});

Which enables the underlying plugin to handle the "im developing my add-on" or "my addon dep changed" cases.

@rwjblue
Copy link
Member

rwjblue commented Mar 4, 2017

Was addressed by #90.

@rwjblue rwjblue closed this as completed Mar 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants