Open NullVoxPopuli opened 6 years ago
Here is a test app: https://github.com/NullVoxPopuli/test-ember-paper-with-module-unification
Some notes on setting things up:
npm install -g https://github.com/ember-cli/ember-cli.git
# output omitted
MODULE_UNIFICATION=true EMBER_CLI_MODULE_UNIFICATION=true ember new test-ember-paper-with-module-unification
# output omitted
cd test-ember-paper-with-module-unification
# output omitted
yarn
# output omitted
ember- install ember-paper
# output omitted
yarn start
yarn run v1.7.0
$ ember serve
Could not start watchman
Visit https://ember-cli.com/user-guide/#watchman for more info.
Deprecation warning: sassOptions should be moved to your ember-cli-build
Build Error (ConfigReplace)
ENOENT: no such file or directory, stat '/home/me/Development/NullVoxPopuli/test-ember-paper-with-module-unification/tmp/config_replace-input_base_path-sd0dO3vt.tmp/0/index.html'
Stack Trace and Error Report: /tmp/error.dump.097bcfd9117d288a7c91c0b812847f6f.log
blueprint still using classic layout -- which is fine. I move content to src/ui/styles/app.scss
I delete the app folder, and re-run yarn start
yarn run v1.7.0
$ ember serve
Could not start watchman
Visit https://ember-cli.com/user-guide/#watchman for more info.
Deprecation warning: sassOptions should be moved to your ember-cli-build
Build Error (ConfigReplace)
ENOENT: no such file or directory, stat '/home/me/Development/NullVoxPopuli/test-ember-paper-with-module-unification/tmp/config_replace-input_base_path-s0K9Is7y.tmp/0/index.html'
Stack Trace and Error Report: /tmp/error.dump.9df0ae4736a5d0d1a0179715c4bd0d95.log
So, I'm not sure if this is a module-unification issue or an ember-paper one.
//cc @miguelcobain @mixonic
ember-cli/ember-cli#8133
good news: it kinda works now:
the only remaining TODO is to:
ember new my-app -b ember-octane-app-blueprint # note: this blueprint name may change in the future
cd my-app
yarn ember install ember-paper
mv app/styles/app.scss src/ui/styles/app.scss
rm -rf app/
rm -rf src/ui/styles/app.css
yarn start
# replace welcome page with any ember-paper component
@NullVoxPopuli it would be nice we could detect if the addon is being installed in an MU enabled app and create the scss file accordingly.
@miguelcobain I think there is an isModuleUnification()
helper function on ... the project
object? It's been a while since I looked at that. But yes! there is a way! :D
@miguelcobain
it would be nice we could detect if the addon is being installed in an MU enabled app and create the scss file accordingly.
Yes, I also think we need an API for that.
See how it has been detected at https://github.com/ember-cli/ember-welcome-page/blob/1b62db3bbd728c8a2df9dd1e56739a2b94be0a40/index.js#L17
@NullVoxPopuli https://github.com/emberjs/ember.js/issues/17234#issuecomment-461810595
seems like it mostly has to do with there styles get exposed to the host app. idk if there is something simple we can do so that existing style addons can "just work", or if we're going to make all the style addons add an octane / isModuleUnification condition?
This particular issue is that the blueprint generator does not create file in the correct location for MU apps and it should be fixed by https://github.com/miguelcobain/ember-paper/pull/1054
project.isModuleUnification
.
I did:
I moved app/styles/app.scss to ui/styles/app.scss
Got this error
So, I moved the file back to app/styles/app.scss, and the problem/error was the exact same. I even tried the steps again without moving the defaultly generated file.