broccolijs

ember-cli fails on --environment=production (Uncaught Error: Could not find module)

泄露秘密 提交于 2019-12-04 14:00:42
I am using ember-cli and have a problem with selecting the production environment. Specifically, everything works when I run ember serve --environment=development and I get a blank page when I run ember serve --environment=production . In the console, I see: Uncaught TypeError: undefined is not a function Uncaught Error: Could not find module simple-auth/authenticators/base All other things are equal, and all dependencies are up to date. I'm a total noob so I don't even know where to begin on how to debug: is it ember? ember-cli? broccoli? Any help would be appreciated. Daniel Kmak Solution is

How to debug slow Ember CLI/Broccoli builds

寵の児 提交于 2019-12-03 15:30:15
问题 My Ember CLI project is currently taking 8-9 seconds to build, and I'd like to understand why. The project is not that large (~180 files under app/ including hbs and scss). Here's my brocfile: https://gist.github.com/samselikoff/874c90758bb2ce0bb210 However, even if I comment my entire Brocfile out and export just the app variable, the build still takes 5-6 seconds. I'm not quite sure how debug. Here's my slowest tree logs: Build successful - 8874ms. Slowest Trees | Total --------------------

How to debug slow Ember CLI/Broccoli builds

孤街醉人 提交于 2019-12-03 05:55:35
My Ember CLI project is currently taking 8-9 seconds to build, and I'd like to understand why. The project is not that large (~180 files under app/ including hbs and scss). Here's my brocfile: https://gist.github.com/samselikoff/874c90758bb2ce0bb210 However, even if I comment my entire Brocfile out and export just the app variable, the build still takes 5-6 seconds. I'm not quite sure how debug. Here's my slowest tree logs: Build successful - 8874ms. Slowest Trees | Total -------------------------------+---------------- TreeMerger (appAndDependencies)| 1286ms TreeMerger (vendor) | 1275ms

Replace broccoli-sass with broccoli-compass in broccoli-sample-app

冷暖自知 提交于 2019-12-01 01:04:35
I'm attempting to replace broccoli-sass with broccoli-compass , in the Broccoli Ember Sample . My app structure looks like: app public styles app.scss Brocfile: ... var compileSass = require('broccoli-compass') ... var appNamespace = 'my-app-name'; function preprocess (tree) { tree = filterTemplates(tree, { extensions: ['hbs', 'handlebars'], compileFunction: 'Ember.Handlebars.compile' }) return tree } var app = 'app' app = pickFiles(app, { srcDir: '/', destDir: appNamespace // move under app namespace }) app = preprocess(app) var styles = 'styles' styles = pickFiles(styles, { srcDir: '/',

Replace broccoli-sass with broccoli-compass in broccoli-sample-app

◇◆丶佛笑我妖孽 提交于 2019-11-30 19:20:39
问题 I'm attempting to replace broccoli-sass with broccoli-compass, in the Broccoli Ember Sample. My app structure looks like: app public styles app.scss Brocfile: ... var compileSass = require('broccoli-compass') ... var appNamespace = 'my-app-name'; function preprocess (tree) { tree = filterTemplates(tree, { extensions: ['hbs', 'handlebars'], compileFunction: 'Ember.Handlebars.compile' }) return tree } var app = 'app' app = pickFiles(app, { srcDir: '/', destDir: appNamespace // move under app

Exclude folders from builds in Brocfile

半城伤御伤魂 提交于 2019-11-30 18:43:13
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 like to build them all when environment is set to 'development' or only eg. 'app1' when environment is 'app1'. Any suggestions? I have tried different combinations of broccoli-file-remover, broccoli-funnel and broccoli-merge-trees to no avail. var removeFile = require('broccoli-file-remover'); module.exports = removeFile(app.toTree(), { paths: ['app

How to generate image sprites in ember-cli using compass?

一曲冷凌霜 提交于 2019-11-28 07:15:23
Update - 20140614: After not getting any answers to this question, or on github, I decided to come up with my own solution to the problem. I was using compass for a number of things, but its main utility was in its ability to generated image sprites. Most other things could be accomplished using pure SCSS. Thus, I wrote broccoli-sprite . This, used in conjunction with ember-cli's built in support for SCSS using broccoli-sass , was able to meet my needs. You can read more about the process here . Now I am thus no longer interested in integrating compass into my ember-cli app. As my solution

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",