angularjsmodel-view-controllerember.jsember-clicodesmith

Using EmberJS in metalsmith.IO


I need to use EmberJS within an already existing codesmith.IO project that previously was using Angular 1. I feel like I'm missing something simple in terms of implementing that, and since I've always used Ember CLI to generate the template for a new app I'm a bit lost in terms of what is actually needed for Ember to run within an enviroment like codesmith which is a regular static site generator.

If anyone could enlight me on where I'm overcomplicating the implementation in my head I'd be more than grateful :-)


Solution

  • Using Ember without Ember CLI is somewhat deprecated. You can still download prebuilt ember.js files from https://emberjs.com/builds/release, but it is recommended to use Ember CLI instead whenever possible.

    If you want to use an Ember app in a static site generator you would likely develop the app in a subfolder with Ember CLI. Whenever you change something build it using ember build -prod, then copy the resulting vendor.js and your-app.js files into a folder of your static site generator and finally include them using <script> tags.