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

Make this project an ember-cli also? #3

Open
rwjblue opened this issue Apr 13, 2017 · 0 comments
Open

Make this project an ember-cli also? #3

rwjblue opened this issue Apr 13, 2017 · 0 comments

Comments

@rwjblue
Copy link

rwjblue commented Apr 13, 2017

I believe making this project an ember-cli addon would basically require the following steps:

  • add the following to package.json:
{
  // snip ....
  "keywords": [
    // existing keywords?
    "ember-addon"
  ],
  "ember-addon": {
    "main": "ember-addon-index.js"
  }
}
  • add an ember-addon-index.js file with the following contents:
const MergeTrees = require('broccoli-merge-trees');
const StyleManifest = require('broccoli-style-manifest');

module.exports = {
  name: 'broccoli-style-manifest',

  preprocessTree(type, tree) {
    if (type === 'src') {
      return new MergeTrees([tree, new StyleManifest(tree, {
        outputFileNameWithoutExtension: 'src/ui/styles/app'
      })], { overwrite: true });
    }
  }
};
  • profit?

Doing the above would enable folks to opt-in to colocated styles in glimmer apps (and ultimately ember apps with module unification layout) via:

ember new my-app -b @glimmer/blueprint
cd my-app
ember install broccoli-style-manifest
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

1 participant