Commit b6144151 by kiran

Merge remote-tracking branch 'upstream/master'

parents 0d93647e 8e1daa15
[submodule "libsass"] [submodule "libsass"]
path = src/libsass path = src/libsass
url = git://github.com/hcatlin/libsass.git url = git://github.com/sass/libsass.git
[submodule "test/sass-spec"] [submodule "test/sass-spec"]
path = test/fixtures/spec path = test/fixtures/spec
url = https://github.com/sass/sass-spec.git url = https://github.com/sass/sass-spec.git
...@@ -156,6 +156,7 @@ function watch(options, emitter) { ...@@ -156,6 +156,7 @@ function watch(options, emitter) {
gaze.on('error', emitter.emit.bind(emitter, 'error')); gaze.on('error', emitter.emit.bind(emitter, 'error'));
gaze.on('changed', function(file) { gaze.on('changed', function(file) {
options = getOptions([file], options);
emitter.emit('warn', '=> changed: ' + file); emitter.emit('warn', '=> changed: ' + file);
render(options, emitter); render(options, emitter);
}); });
......
...@@ -83,14 +83,8 @@ ...@@ -83,14 +83,8 @@
] ]
}], }],
['OS!="win"', { ['OS!="win"', {
'cflags+': [
'-std=c++11'
],
'cflags_c+': [
'-std=c++11'
],
'cflags_cc+': [ 'cflags_cc+': [
'-std=c++11' '-std=c++0x'
] ]
}] }]
] ]
......
...@@ -163,6 +163,31 @@ describe('cli', function() { ...@@ -163,6 +163,31 @@ describe('cli', function() {
fs.appendFileSync(src, 'body {}'); fs.appendFileSync(src, 'body {}');
}, 500); }, 500);
}); });
it('should render all watched files', function(done) {
fs.writeFileSync(fixture('simple/foo.scss'), '');
fs.writeFileSync(fixture('simple/bar.scss'), '');
var src = fixture('simple/foo.scss');
var watched = fixture('simple/bar.scss');
var bin = spawn(cli, [
src, '--stdout', '--watch', watched,
'--output-style', 'compressed'
]);
bin.stdout.setEncoding('utf8');
bin.stdout.on('data', function(data) {
assert(data.trim() === 'body{background:white}');
bin.kill();
fs.unlinkSync(src);
fs.unlinkSync(watched);
done();
});
setTimeout(function() {
fs.appendFileSync(watched, 'body{background:white}');
}, 500);
});
}); });
describe('node-sass in.scss --output out.css', function() { describe('node-sass in.scss --output out.css', function() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment