ember-cli

Getting “Uncaught Error: Assertion Failed: Ember Views require jQuery between 1.7 and 2.1” with app created through ember-cli

空扰寡人 提交于 2019-11-27 14:33:52
I'm starting with ember. I followed the Getting Started guide at emberjs.com and managed to create a new ember application by running the following commands: npm install -g ember-cli ember new sample-app Everything went successful and I can see the app files generated by ember-cli. Soon after that I did: ember server The command line shows: version: 1.13.13 Livereload server on http://localhost:49153 Serving on http://localhost:4200/ Build successful - 4426ms. Slowest Trees | Total ----------------------------------------------+--------------------- ConcatWithMaps: Concat: Vendor | 3498ms

Violating Content Security Policy directive after ember-cli 0.0.47 upgrade

有些话、适合烂在心里 提交于 2019-11-27 09:45:54
问题 I upgraded my ember-cli app to 0.0.47 and am now getting a bunch of errors in my browser console related to the content security policy. How do I fix this issue? Refused to load the script 'http://use.typekit.net/abcdef.js' because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-eval' localhost:35729". login:1 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-eval' localhost

Setting CORS for static files on ember-cli server

社会主义新天地 提交于 2019-11-27 07:47:44
问题 How do I set CORS on requests for fonts files (or any other static resource) on the built in ember-cli server? This is the error message just for reference: Font from origin 'http://some-domain:4200' has been blocked from loading by Cross-Origin Resource Sharing policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:61277' is therefore not allowed access. 回答1: Add the following to ENV in config/environment.js: module.exports = function

How to use third party npm packages with ember cli app

偶尔善良 提交于 2019-11-27 07:16:22
EDIT: this is actually about any npm package which is not designed to play along with ember. In my case, I tried to make crypto-js work, but it seems to be always the same trouble with any npm package not specially designed for ember cli. I want to use cryptoJS in my ember app, which I'm currently refactoring with ember cli, but I'm having a lot of trouble importing all the third party packages and libraries I'm already using, like for example cryptoJS. CryptoJS at least has a package for npm, I don't even want to think about what happens if some of my included libraries don't have a package..

Multiple “apps” with ember-cli

你。 提交于 2019-11-27 05:39:42
问题 I'm trying to migrate to ember-cli from some old homegrown build tools. Our app is quite large and is actually split into several ember.js single page apps (e.g. index, admin, reports, etc) that share a common set of utils and components. I'm trying to figure out if that's even possible with ember-cli and if so, how do I do it? I saw some people talking about pods, others talking about addons and yet another set of people talking about private bower repos. I tried finding out information on

Handling errors with the (now default) Ember Data JSON-API adapter

二次信任 提交于 2019-11-27 03:58:41
I am using Ember 1.13.7 and Ember Data 1.13.8, which by default use the JSON-API standard to format the payloads sent to and received from the API. I would like to use Ember Data's built-in error handling in order to display red "error" form fields to the user. I have formatted my API error responses as per the JSON-API standard, e.g. {"errors":[ { "title":"The included.1.attributes.street name field is required.", "code":"API_ERR", "status":"400", } ]} and when I attempt to save my model the error callback is being correctly executed. If I look within the Ember Inspector I can see that the

Ember CLI Code Coverage Reports

こ雲淡風輕ζ 提交于 2019-11-27 01:51:29
问题 I am using Ember CLI and I am trying to integrate code coverage reports with the built in Qunit tests that are run with testem. I tried to use Istanbul, but I couldn't get it to find the files to instrument because it seems to be looking in the tmp directory. I tried doing this in my testem.json: { "framework": "qunit", "serve_files": [ "instrumented/components/*.js" ], "before_tests": "istanbul instrument --output instrumented/components app/components", "after_tests": "istanbul report",

Recommended way to include bootstrap library in Ember.JS ember-cli App

折月煮酒 提交于 2019-11-26 23:55:24
I am trying to install properly Twitter Bootstrap in my current ember-cli project. I did install bootstrap with bower : bower install --save bootstrap Now the library is downloded in /vendor/bootstrap/dist/(css|js|fonts) I tried what is mentioned here : http://ember-cli.com/#managing-dependencies replacing path and css files names but I get errors regarding the Brocfile.js file. I think the brocfile format has changed too much compared to the example. I also tried to @import with the /app/styles/app.css file after moving the stylesheets in the /app/styles/ directory : @import url('/assets

babel is exporting “this” as undefined in ember computed property

Deadly 提交于 2019-11-26 23:30:51
问题 using ember-cli@0.2.7 and emberjs@1.13.2 . Source emberjs model export default DS.Model.extend({ name: DS.attr('string'), displayName : Ember.computed('name', () => { return this.get('name'); }) }); Translated model 'use strict'; var _this = undefined; exports['default'] = DS['default'].Model.extend({ name: DS['default'].attr('string'), displayName: Ember.computed('name', function () { return _this.get('name'); //at this point _this is undefined }) }); The trouble is that _this is never set

How to use third party npm packages with ember cli app

我的梦境 提交于 2019-11-26 17:38:48
问题 EDIT: this is actually about any npm package which is not designed to play along with ember. In my case, I tried to make crypto-js work, but it seems to be always the same trouble with any npm package not specially designed for ember cli. I want to use cryptoJS in my ember app, which I'm currently refactoring with ember cli, but I'm having a lot of trouble importing all the third party packages and libraries I'm already using, like for example cryptoJS. CryptoJS at least has a package for npm