ember-cli

Retain fixtures with multiple adapters per Ember environment

回眸只為那壹抹淺笑 提交于 2019-12-08 19:21:33
问题 Although the natural progression would replace the fixture adapter with another adapter, I'd like to retain fixtures for development environment while leveraging a different Ember data adapter for production. This is due to: Heavy iterations of progressive enhancement Intended to run embedded in a UIWebView from an iOS app, production configuration is tightly coupled with bridged calls to native assembly for data. Ember CLI asset compilation is based on broccoli to load either a Web or Native

how to deploy ember-cli + rails app on heroku

廉价感情. 提交于 2019-12-08 18:47:32
I am trying to deploy an Ember-cli app by copying the files generated by ember build into the rails public folder following the approach shown in: http://blog.abuiles.com/blog/2014/05/21/deploying-ember-cli-and-rails-to-heroku/ https://github.com/dockyard/ember-cli-plus-backend/tree/rails-served-html/frontend/app But it doesn't seem to work as shown in the app on heroku , rather than display the content, it displays raw json on the web page which suggests the emberjs route model hook is not being called when you enter the app via url. The JSON it displays is something like this: [{"id":1,"name

Ember components in subdirectory

隐身守侯 提交于 2019-12-08 15:50:15
问题 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 like this: app/components/sub/test-comp.js app/templates/components/sub/test-comp.hbs referencing by: (in another .hbs file) {{test-comp model=model}} gives me the following error: A helper named 'test-comp' could not be found ember: 1.10.0 ember-cli

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

非 Y 不嫁゛ 提交于 2019-12-08 15:47:05
问题 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 knowledge about AMD, which is not the case for me. My immediate use case is import math.js. Unfortunately, the official document of math.js doesn't provide example about importing with Ember Cli. Then, I found this post with relatively clearer examples, in

How to make a production ready build using Ember CLI?

我们两清 提交于 2019-12-08 14:34:21
问题 I've been building a web app in Ember, and am ready to put it on a server for public use. I just want to make the /dist/ folder, which i will then manually upload to a server via FTP. How do I build a dist for this in Ember? I can't figure out how to turn on minification and remove the tests files from the build. I'm guessing it has something to do with my Brocfile.js, bower.json, package.json, environment.js or tester.json files, but I don't really know which one, or what that config would

Ember : addObject/ pushObject is not a function

扶醉桌前 提交于 2019-12-08 13:18:50
问题 I recently moved from ember 1.x to 2.6. I am not able to use addObject/pushObject like i used to. Ember : 2.6.2 jQuery : 2.2.4 import Ember from 'ember'; export default Ember.Controller.extend({ test: ['sibi', 'john'], init: function() { this.get('test').pushObject('sebastian'); } }); This throws an error like pushObject is not a function. What is the workaround? Thank you. 回答1: The extend prototypes option was false for some reason. You can read more about disabling prototype extensions in

Reinstall node using nvm on OS X without removing node_modules?

有些话、适合烂在心里 提交于 2019-12-08 12:54:58
问题 Following the latest advice I decided to remove a previous working Homebrew node install and use nvm to install node instead, and also set things up to avoid using sudo. However, before going further I carefully cleaned out the following folder (owned by my user) except for two modules used for a long-standing Ember project that uses an older version of node (because I'm not confident of reinstalling the required version of them later): /usr/local/lib/node_modules/ bower ember-cli If I keep

Ember Cli Authentication with node server and social logins

血红的双手。 提交于 2019-12-08 10:59:48
问题 I am building a ember cli app and I would like to know what is the best approach for user authentication and authorization. I fiddled around with https://github.com/simplabs/ember-simple-auth https://github.com/simplabs/ember-simple-auth/tree/master/packages/ember-simple-auth-torii along with it for social auth like facebook and gmail. But what happens is client(emberjs) sends request to facebook/gmail app and gets back a token. But this token is on the client side and my server does not know

npm install ember-cli Maximum call stack size exceeded

家住魔仙堡 提交于 2019-12-08 09:21:46
问题 I'm facing a similar issue found in this question: Win 8.1, Vagrant, Chef, Ubuntu, Ember-cli, ember new "npm ERR! tar.unpack untar error /home/vagrant/.npm/" I'm trying to update an older ember project to 2.1 using the new ember-cli. I'm running my project on a vagrant server. I have node (v.0.12.7), npm (3.3.10), bower (1.6.5) and ember-cli -g (version: 1.13.8, node: 0.12.7, npm: 2.13.4, os: linux x64) installed. Yet, whenever I'm running "npm install --no-bin-links" on the project generated

Embed CSRF token into Ember CLI application

試著忘記壹切 提交于 2019-12-08 05:44:35
问题 I'm designing my new Ember CLI application. I gonna use Ember Simple Auth for authorisation. And I also need to use CSRF protection. I know how to inject the token to requests. The problem is how to embed the token to the application in a right way. It is required the token to be generated on the backend side and to be embedded into the page. And it should be the same one that API uses to verify requests. In my case API and Ember application would be served by the same web server (most likely