broccolijs

Exclude folders from builds in Brocfile

試著忘記壹切 提交于 2020-01-11 00:11:35
问题 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

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

别等时光非礼了梦想. 提交于 2019-12-17 18:25:53
问题 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.

Ember CLI fails in production

…衆ロ難τιáo~ 提交于 2019-12-13 15:46:53
问题 I am deploying an Ember CLI app through jenkins and publishing it using nginx. Here is by jenkins build script: npm install bower install node_modules/ember-cli/bin/ember build --environment=production The nginx configuration simply directs sub.domain.com to jenkins\jobs\lastStable\archive\dist . That works fine, but when I go the page, it is blank and the following output in the console: TypeError: Ember.Handlebars.compile is not a function vendor-92ab6507ac60a5bf7c6819aa8fc418d6.js:18

ember build fails, no such file or directory lstat …funnel-input_base_path-XXX.tmp/0//index.html

雨燕双飞 提交于 2019-12-12 05:38:57
问题 The file it tries to find doesn't exist and neither does the funnel-input_base_path-XXX.tmp folder. It's no use to create one manually as the XXX part is randomly generated. [folatt@ArkOS_Dev genesis]$ ember build (node:22373) fs: re-evaluating native module sources is not supported. If you are using the graceful-fs module, please update it to a more recent version. WARNING: Node v6.2.1 has currently not been tested against Ember CLI and may result in unexpected behaviour. version: 1.13.13

add livereload to broccoli

南楼画角 提交于 2019-12-11 12:12:55
问题 I'm trying to add livereload to broccoli Unfortunately the live-reload plugin documentation is a bit short and I cannot get it to work. In the docs it is stated to do the following: var injectLivereload = require('broccoli-inject-livereload'); var public = injectLivereload('public'); I figured that this should be placed inside the Brocfile.js (right?). But whatever I do nothing gets reloaded (I have to hit reload to refresh) I've also changed the 'public' part, which I think is representing a

How to import socket.io via brocfile for ember cli application?

独自空忆成欢 提交于 2019-12-11 09:54:21
问题 I want to use socket.io in my ember cli application, so I installed with: bower install socket.io --save And added the following line to my Brocfile.js : app.import('bower_components/socket.io/index.js'); This results in two errors in my browser console: Uncaught ReferenceError: module is not defined Uncaught Error: Could not find module ember-moment/helpers/moment Any ideas? 回答1: Ended up using socket.io-client which imports without errors. app.import('bower_components/socket.io-client

Broccoli-compass and ember-cli 0.39

孤者浪人 提交于 2019-12-11 01:41:32
问题 I recently upgraded ember-cli to .39, and something changed to cause my broccoli-compass code to break. Here's the code: app.styles = function() { return compileCompass(this.appAndDependencies(), this.name + '/styles/app.scss', { compassCommand: 'bundle exec compass', outputStyle: 'expanded', sassDir: this.name + '/styles', imagesDir: 'public/images', cssDir: '/assets' }); }; I get this error: [broccoli-compass] Error: Command failed: Errno::ENOENT on line ["155"] of ~/.rvm/gems/ruby-2.1.1

How do I execute a post build hook in an ember-cli Brocfile.js?

試著忘記壹切 提交于 2019-12-10 13:14:11
问题 I have a ember-cli project that builds to the dist/ directory. I've configured the app to handle assets in the dist/ directory and set the history to use a hash instead of pushState. This allows me to sym-link the index.html to the root. The reasoning is that pushing the project to gh-pages on GitHub requires a root index.html and ember apps require routing to be absolute not relative (AFAIK). GitHub however will not follow sym-links and require a copy of the output index.html . This works

In-repo addon writing public files on build causes endless build loop on serve

折月煮酒 提交于 2019-12-07 14:44:11
问题 I'm having difficulty with my in-repo addon writing to appDir/public. What I'd like to do is write out a JSON file on each build to be included in the app /dist. The problem I'm running into is when running "ember serve", the file watcher detects the new file and rebuilds again, causing an endless loop. I've tried writing the JSON file using preBuild() and postBuild() hooks, saving to /public, but after build, the watcher detects it and rebuild over and over, writing a new file again each

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

被刻印的时光 ゝ 提交于 2019-12-06 07:36:18
问题 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