Coder Social home page Coder Social logo

dazzlingfugu / ember-cli-embedded Goto Github PK

View Code? Open in Web Editor NEW
16.0 16.0 4.0 3.41 MB

Control how your Ember applications boot in non-Ember pages/apps.

License: MIT License

JavaScript 37.91% HTML 7.06% TypeScript 54.84% Handlebars 0.19%
ember ember-addon hacktoberfest

ember-cli-embedded's People

Contributors

bluecutofficial avatar cah-danmonroe avatar dependabot[bot] avatar ember-tomster avatar github-actions[bot] avatar greatwizard avatar jacky-peopledoc avatar mrchocolatine avatar ndekeister-us avatar pixelik avatar romgere avatar saintsebastian avatar spinelle avatar xcambar avatar yonmey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ember-cli-embedded's Issues

Configuration api is not suitable for use

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

  • app does not depend on ember-cli-embedded
  • no code changes required for embedded mode

Issues

  • not all config will reflect changes (e.g. rootElement does not work)

What are the advantages of introducing new configuration system with ember-cli-embedded rather than using existing one?

Move on more recent Ember version

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

Kill `config:embedded`

Stop using config:embedded as a configuration store and instead add a key to config:environment, such as APP.embedded = { /* my config */}

Example Repo

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).

`Ember.String` deprecation warning as of Ember 4.10

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.

1.0.0

Currently, the main features of this addon are:

  • MyApp.start(config)
  • container.resolve('config:embedded')
  • container.resolve('service:embedded')
  • Merge the configs into config/environment.APP
  • Coerce the embedded config for backward compatibility

There must be a discussion (or better, a migration path) towards simplifying it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.