Questions tagged [ember-cli]

Node.js module which provides a command line interface (CLI) for developing Ember.js applications

A command line utility for creating applications.

Applications created with this tool benefit by being structured according to an ideal project template for Ember.js. It is also "batteries included", with support for generators/blueprints, dependency management, asset compilation, testing, and ECMAScript 6 modules.

For more information see the project documentation and the GitHub project page.

3109 questions
11
votes
1 answer

Configure CSP in an Ember CLI application which uses http-mock

I'm using http-mock with Ember CLI as suggested on http://www.ember-cli.com/#ember-data. I understand the basic concept of CSP but I don't understand the configuration of it within an Ember CLI application. How can I configure my application to…
wintermeyer
  • 8,178
  • 8
  • 39
  • 85
11
votes
4 answers

Ember CLI Live Reload Not Working

I've seen other similar questions here and here but neither of those worked for me. I'm on a mac and simply installed ember cli using npm and I thought it would work out of the box. Here is the server output: version: 0.1.4 Could not find watchman,…
D. Alvarez
  • 351
  • 2
  • 10
11
votes
1 answer

Ember-cli unit tests with relationships 'needs'

I am working on my unit tests and it feels like I am doing something incorrect. I have a 'main' object that has many relationships author: belongsTo('person', { async: true }), title: attr('string'), category: belongsTo('category', { async: true…
RyanHirsch
  • 1,847
  • 1
  • 22
  • 37
11
votes
2 answers

Using mixins with Ember-cli?

I have a mixin app/mixins/ui-listener.js which I'm struggling to use with Ember-CLI. I'm trying to use the mixin with the following syntax: import ListenerMixin from './mixins/ui-listener'; export default Ember.Component.extend(ListenerMixin,{ …
ken
  • 8,763
  • 11
  • 72
  • 133
11
votes
2 answers

Ember.js Utility Class

I am new to Ember.js and Javascript in general. I am using ember-cli to create an app that could use a DateUtil class to perform some date manipulation. I noticed that ember-cli has a utilities generator to produce the following boilerplate code in…
Anthony
  • 125
  • 1
  • 7
11
votes
2 answers

Ember.js, EmberCLI - removing the hash ( # ) from the URL

So according to Ember's documentation Ember defaults to using the hashchange event. Thats why we have the fancy #/some/url setup. We can also set it to use the browser's history API. I've noticed that most (if not all) sites listed on Built with…
JDillon522
  • 19,046
  • 15
  • 47
  • 81
11
votes
2 answers

How to import module ember-localstorage-adapter with Ember-CLI?

I tried to import ember-localstorage-adapter as import DS.LSAdapter from "ember-localstorage-adapter"; But I got the error Error: Line 5: Missing from after import Do I need to compile ember-localstorage-adapter with ES6 Module Transpiler?
Dmitro
  • 1,489
  • 4
  • 22
  • 40
10
votes
1 answer

How should I share data between Ember components?

My Ember app has a route that contains 2 different components and one controller with an index.hbs template. Here's what it looks like: 1) A user can select multiple filters from the dropdowns of the Filter Component 2) The DataGrid is a separate…
PhillipKregg
  • 9,358
  • 8
  • 49
  • 63
10
votes
3 answers

How to test String.prototype.includes in PhantomJS

I have an ember-cli 0.2.7 using Ember.js 1.12.0 app with a piece of code that looks like: controllers/cart.js import Ember from 'ember'; export default Ember.Controller.extend({ footwearInCart: Ember.computed('model.@each.category', function()…
zshnr
  • 279
  • 4
  • 12
10
votes
1 answer

Move Entire Folder using Broccoli JS in Ember CLI Project

I am developing an ember-cli project and I am working on a system that allows me to resolve templates that have not been loaded and may possibly live outside of the project structure. I would like to have a folder in my dist/assets directory called…
BillPull
  • 6,853
  • 15
  • 60
  • 99
10
votes
3 answers

Exclude folders from builds in Brocfile

Is there a way to exclude a folder from a build in a Brocfile (or any other place). The use case is packaging, where I have an app made of sub-apps within pods. eg. /app/modules/components /app/modules/app1 /app/modules/app2 /app/modules/app3 I'd…
WooDzu
  • 4,771
  • 6
  • 31
  • 61
10
votes
1 answer

Import dependencies in ember-cli (e.g., import math.js)

I am puzzled about importing dependencies in ember-cli, especially about the standard AMD case, as mentioned in the official Ember Cli document. The document doesn't provide much of examples, and seems to me it assumes the readers have good…
JBT
  • 8,498
  • 18
  • 65
  • 104
10
votes
3 answers

How to create unit tests for Ember.js adapter/serializers?

I'm building an Ember CLI app (v0.2.3), and I have some unit tests that have been generated for me for the adapters and serializer in my app. The generated code looks like this: // app/serializers/my-model-test.js // Replace this with your real…
user2688473
  • 633
  • 1
  • 6
  • 8
10
votes
1 answer

How to inject the store into an Ember.Service in unit tests?

In my app I have this initializer which injects the store into all services: export function initialize(container, application) { application.inject('service', 'store', 'store:main'); } export default { name: 'inject-store-in-services', …
charles_demers
  • 125
  • 2
  • 6
10
votes
1 answer

Ember components in subdirectory

I've read that having directories/folders inside of /components is now supported. Using ember-cli I can generate the necessary subdirectory/component required. However, I cannot seem to reference the component. For example if I a folder structure…
leojh
  • 7,160
  • 5
  • 28
  • 31