Stylus re-compiles inconsistently with Ember-cli

I'm attempting to incorporate Stylus into an Ember-cli based project. On 'ember s' the stylus is compiling app.styl and all imported style sheets as desired but whilst running will fail frequently and inconsistently to re-compile upon receiving changes.

Version;

  • Ember-cli 0.0.46
  • Node 0.10.32
  • NPM 1.5.0-alpha-4

app/styles/app.styl;

@import "reset";
@import "config";
@import "site-header";
@import "site-footer";
@import "login-bar";

body {
  color: white;
}

Each imported styl file is also within the 'app/styles/' folder.

package.json;

"devDependencies": {
  "body-parser": "^1.2.0",
  "broccoli-asset-rev": "0.1.1",
  "broccoli-ember-hbs-template-compiler": "^1.6.1",
  "broccoli-merge-trees": "^0.1.4",
  "broccoli-stylus-single": "~0.3.0",
  "ember-cli": "0.0.46",
  "ember-cli-ic-ajax": "0.1.1",
  "ember-cli-inject-live-reload": "^1.0.2",
  "ember-cli-qunit": "0.1.0",
  "ember-data": "1.0.0-beta.10",
  "express": "^4.8.5",
  "glob": "^4.0.5"
}

If I make changes to app.styl Ember-cli will recognize this, re-build and update the asset/project_name.css file accordingly. However if making changes to an imported child of app.styl (for example "site-footer", Ember-cli will inconsistently re-build and update the .css as expected. It typically works for the first attempt then ignores all further changes thereafter (on any child styl).

The only solution being to terminate and re-run 'ember s'.

Additional Info

I've attempted to enforce re-compile within the Brocfile.js by altering the default from...

// Ember
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
var app = new EmberApp();

module.exports = app.toTree();

.. to the following...

// Ember
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
var app = new EmberApp();

// Stylus
var mergeTrees = require('broccoli-merge-trees');
var compiledStylus = require('broccoli-stylus-single');
var stylus = compiledStylus(['app/styles'], 'app.styl', 'assets/project_name.css', {
  'include css': true,
  'compress': true,
});

module.exports = mergeTrees([app.toTree(), stylus], { overwrite: true });

.. which only resulted in the same issue duplicating itself, to find the file changes twice but have the same resulting issue.

The issue was with Stylus caching, fixed by making a change to..

node_modules/broccoli-stylus-single/index.js (line 35);

var stylusOptions = {
  filename: includePathSearcher.findFileSync(self.inputFile, includePaths),
  paths: includePaths,
  cache: false,
}

Alternatively able to fix manually via options parameter in brocfile.