dazzlingfugu / ember-cli-embedded Goto Github PK
View Code? Open in Web Editor NEWControl how your Ember applications boot in non-Ember pages/apps.
License: MIT License
Control how your Ember applications boot in non-Ember pages/apps.
License: MIT License
See the release notes:
And the relevant pull request:
Because we rely on this add-on we will need to add a warning.
The problem we have with passing configuration to ember-cli-embedded is that all code references have to be changed which access config/environment.js
.
const embeddedConfig = container.lookup('config:embedded');
The problem is that config:embedded
is only available when ember-cli-embedded
is enabled, meaning it can't be environment specific.
We've ended up doing plain ember approach:
GlobalAppVar.__container__.lookupFactory('config:environment').APP.host = 'example.com'
Advantages
Issues
What are the advantages of introducing new configuration system with ember-cli-embedded
rather than using existing one?
Currently, projects which use this plugin are not able to be on Ember 2.15+.
Some code migration has to be done.
Thanks in advance :D
DEPRECATION: The initialize
method for Application initializer 'ember-cli-embedded' should take only one argument - App
, an instance of an Application
. [deprecation id: ember-application.app-initializer-initialize-arguments] See http://emberjs.com/deprecations/v2.x/#toc_initializer-arity for more details.
Stop using config:embedded
as a configuration store and instead add a key to config:environment
, such as APP.embedded = { /* my config */}
Is there an example app where this is running?
I did a production build of my app, then opened dist/index.html in the browser and got the following error:
Uncaught ReferenceError: define is not defined
Versions:
"ember-cli": "1.13.15",
"ember": "2.3",
"ember-cli-embedded": "0.3.1",
Context:
The entire app will be embedded into webpages through a chrome extension (as a sidebar).
Trying to use addon with basically an empty ember 4.4 app and I'm getting this error:
Uncaught TypeError: Cannot read properties of null (reading 'register')
at emberCliEmbeddedStart (embedded.ts:112:14)
I'm going to poke around and see what I can do. I'll pick my co-worker's brain when she gets back too.
I installed ember-cli-embedded
after installing Ember 4.10, and I’m starting to see this deprecation warning in the console regards Ember.String
:
DEPRECATION: Using `Ember.String` is deprecated. Please import methods directly from `@ember/string`. [deprecation id: ember-string.from-ember-module] This will be removed in ember-source 5.0.0. See https://deprecations.emberjs.com/v4.x/#toc_ember-string-from-ember-module for more details.
@http://localhost:4200/assets/vendor.js:23477:17
raiseOnDeprecation@http://localhost:4200/assets/vendor.js:23381:13
@http://localhost:4200/assets/vendor.js:23477:17
handleDeprecationWorkflow@http://localhost:4200/assets/vendor.js:56307:13
@http://localhost:4200/assets/vendor.js:23477:17
deprecationCollector@http://localhost:4200/assets/vendor.js:56342:9
@http://localhost:4200/assets/vendor.js:23477:17
@http://localhost:4200/assets/test-support.js:6076:15
@http://localhost:4200/assets/vendor.js:23477:17
invoke@http://localhost:4200/assets/vendor.js:23486:23
deprecate@http://localhost:4200/assets/vendor.js:23454:28
deprecateStringUseOnEmberModule@http://localhost:4200/assets/vendor.js:51126:51
get@http://localhost:4200/assets/vendor.js:51141:38
initialize@http://localhost:4200/assets/redacted.js:35895:36
@http://localhost:4200/assets/vendor.js:24028:31
@http://localhost:4200/assets/vendor.js:49389:11
@http://localhost:4200/assets/vendor.js:49318:16
@http://localhost:4200/assets/vendor.js:49263:26
@http://localhost:4200/assets/vendor.js:49269:16
_runInitializer@http://localhost:4200/assets/vendor.js:24052:20
runInitializers@http://localhost:4200/assets/vendor.js:24026:27
_bootSync@http://localhost:4200/assets/vendor.js:20514:29
boot@http://localhost:4200/assets/vendor.js:20484:23
@http://localhost:4200/assets/test-support.js:6362:32
promiseReactionJob@[native code]
I haven’t used String
anywhere in my app, and therefore I conclude this package is to blame.
Currently, the main features of this addon are:
MyApp.start(config)
container.resolve('config:embedded')
container.resolve('service:embedded')
config/environment
.APPThere must be a discussion (or better, a migration path) towards simplifying it.
How do I pass rootElement configuration to embedded app?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.