Comments (27)
Did you use the exclude
option to exclude unwanted files ? See the README
from broccoli-compass.
@g13013 I didn't have a chance yet but I will try exclude
and broccoli-static-compiler
options as you suggested. Can you please also explain how does caching work in broccoli compass
?
from broccoli-compass.
Just wanted to chime in, because I ran into the same issue. I'm on ember-cli 0.0.44 as well, and adding the following to my Brocfile.js
fixed the issue:
var app = new EmberApp({
// ...
compassOptions: {
// ...
exclude: ['tmp/**', 'vendor/**', 'node_modules/**', 'bower_components/**'],
}
});
@quaertym It might be worth adding that line or something similar as a default to ember-cli-compass-compiler
.
It's also worth noting that I'm excluding vendor/**
simply because we install compass into vendor/bundle
—we don't use the globally installed version.
from broccoli-compass.
@quaertym take a look at broccoli-caching-writer
from broccoli-compass.
@gigr thanks for your feedback
from broccoli-compass.
@g13013 I am aware that broccoli-compass
uses broccoli-caching writer
but what does broccoli-compass
is doing in its updateCache
function. What does it cache and how that cache is updated by broccoli-compass
?
from broccoli-compass.
No cache is done yet, updateCache
is called only when the source tree changes, that's a first step, so it compiles, copies files and finally cleanup source tmp files, implementing a second cache step is planned
to copy only changed files from source to destination.
from broccoli-compass.
@g13013 Thanks for the explanation. I have another question why don't we use broccoli-static-compiler
when copying the files?
from broccoli-compass.
A good question:
Because @ferrydeboer have done so much good work on this PR that I couldn't delay its merge.
Also, we can't use broccoli-static-compiler
because it involves issuing a merged tree using broccoli-merge-tree
, or, if broccoli
supports it (I think it does), returning the tree within the returned promise, which is in my opinion not advised:
- if an error raises in the process, it could report a problem with
broccoli-static-compiler
it self rather than withbroccoli-compass
, so it could be confusing and very hard to debug. - it is in my sens very much faster to handle changes using broccoli-kitchen-sink-helpers and copying files with native APIs than adding an another tree to
broccoli
stack, especially when the user is not aware of such details.
from broccoli-compass.
broccoli-kitchen-sink-helpers
are not used in broccoli-compass
as far as I can tell copying is done with fs-extra
. Another thing I have noticed is that inputTree is never used by broccoli-compass
it is only used by broccoli-caching-writer
to determine whether to call updateCache or not. In my use case(using this in ember-cli-compass-compiler), this inputTree always changes (e.g if templates or js files are changed let's say.). I will make changes to ember-cli-compass-compiler
to pickFiles with broccoli-static-compiler
but as I said before this input tree is not used in broccoli-compass
. I think we should fix this line to use inputTree somehow.
from broccoli-compass.
@quaertym I think you didn't get the point, I am not saying that we are using broccoli-kitchen-sink-helpers
, I just said that I will use broccoli-kitchen-sink-helpers
in place of broccoli-static-compiler
.
If your files are changing a lot in the source Tree, just use broccoli-static-compiler
and filter out your compass project before submitting the tree to broccoli-compass
.
from broccoli-compass.
closing for now
from broccoli-compass.
Actually the issue is not fixed yet. I only see a solution by adding an include
option. exclude
option does not work in my case because I have to write exclude for every type of file that can be included in an ember-cli
app. I would really appreciate it if you can explain how inputTree is used in broccoli-compass
. This is my last question I promise :)
from broccoli-compass.
why just don't use ?:
var pickFiles = require('broccoli-static-compiler');
var compassTree = pickFiles({
srcDir: '/'
files: ['sass/**', 'images/**', 'fonts/**'],
destDir: '/'
});
var stylesTree = compileCompass(compassTree);
While you need to copy only files related to compass, others can find it useful to process only css and issue all files without the scss/sass source and cache.
that said a second level of cache have to be implemented, but don't have the time right now to do it.
from broccoli-compass.
I do this, but it does not have any effect since the input tree is never used with broccoli-compass
. Am I wrong?
from broccoli-compass.
What do you mean by "input tree is never used with broccoli-compass":
The write
function called by broccoli is handled by broccoli-caching-writer
that lookup for changes, in source tree that call updateCache
of broccoli-compass if a change is detected.
What didn't work for you? please give me a gist
of your project configuration, need more details.
from broccoli-compass.
Ok I understand that broccoli-caching-writer
uses inputTree to determine whether to call updateCache or not. However inputTree is never reached by broccoli-compass
, then why am I using broccoli-compass
instead of broccoli-caching-writer
directly? It should have to do something with the inputTree, right?
from broccoli-compass.
updateCache
just like write
receive the srcDir
param, this is the directory that contains files of inputTree see
from broccoli-compass.
@gigr I tried adding these config options to Brocfile.js and still get the error. Can anyone sort this out? My entire team is blocked because we can't build, serve, or test our ember cli app.
from broccoli-compass.
@scwoodard I have a solution, planning to push a new version of ember-cli-compass-compiler
to npm.
from broccoli-compass.
@shwoodard Weird. If you want to post your Brocfile.js I can take a look and see if there are any other differences.
from broccoli-compass.
@gigr Brocfile.js,
/* global require, module */
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
var app = new EmberApp({
compassOptions: {
exclude: ['tmp/**', 'vendor/**', 'node_modules/**', 'bower_components/**']
}
});
app.import('bower_components/i18n-js/vendor/assets/javascripts/i18n.js');
app.import('vendor/translations.js');
app.import('bower_components/cookies-js/dist/cookies.min.js');
app.import({
development: 'bower_components/underscore/underscore.js',
production: 'bower_components/underscore/underscore-min.js'
});
app.import('vendor/jquery.placeholder.js');
module.exports = app.toTree();
from broccoli-compass.
@shwoodard I am not sure this have anything to do with broccoli-compass
Can you post the error message please ?
@gigr @shwoodard I would not advise to use ember-cli
without broccoli-compass
, maintaining two projects to do the same thing will fragment the tool, and you could face another problems that might be already solved here. contributing, making suggestions or even better, submitting pull requests is more productive.
I am working to improve the cache and and include
will be added soon.
from broccoli-compass.
related: #27
from broccoli-compass.
If https://github.com/g13013/broccoli-compass/blob/master/index.js#L60 where to limit the concurrency, we would likely never run into problems.
https://github.com/g13013/broccoli-compass/blob/master/index.js#L74 copy could only allow N active current copies. Something similar to https://www.npmjs.org/package/filequeue ?
from broccoli-compass.
thanks @stefanpenner, i started a important refactoring where I need your feedbacks to take a decision #27
from broccoli-compass.
I close, should be fixed with the last release. if it happens again reopen.
from broccoli-compass.
Related Issues (19)
- Additional import paths option HOT 7
- Unable to get it to work, no specific error message HOT 13
- Support cache HOT 1
- Improve documentation for usage HOT 3
- CSS for generated sprites have image URLs containing paths of temporary tree folders HOT 15
- Problem with Ember CLI 0.39 HOT 3
- allow excludes to be configurable HOT 1
- consider more exclude defaults HOT 3
- @import "icons/*.png" fails HOT 10
- whitelisting? HOT 4
- Worth complexity trying to re-use the same .sass-cache dir for different builds? HOT 3
- Unable to load extension compass-rails HOT 2
- Changing .sass-cache location HOT 6
- Performance Concerns HOT 10
- Compass can't find any Sass files to compile. HOT 15
- Compass to broccoli-compass HOT 3
- Ember cli addon
- Why all files are copied to destination folder? HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from broccoli-compass.