GithubHelp home page GithubHelp logo

Comments (14)

dadambickford avatar dadambickford commented on May 28, 2024

Tagging @OscarGodson for future reference.

from sane.

amasad avatar amasad commented on May 28, 2024

Are you using vagrant?

On Wednesday, November 5, 2014, Adam Bickford [email protected]
wrote:

Here is our full scss build file:

#!/usr/bin/env node

var fs = require('fs');
var sane = require('sane');
var sass = require('node-sass');

var watcher = new sane.Watcher('./components', {glob: ['*/.scss'], poll: true});

var buildSass = function () {
sass.render({
file: './components/app.scss',
sourceMap: true,
success: function (css) {
fs.writeFile('./public/public_assets/css/built.css', css, function (error) {
if (error) return console.log(error);
console.log('CSS built');
});
},
error: function (error) {
console.log(error);
}
});
};

if (!fs.existsSync('./public/public_assets/css')) {
fs.mkdirSync('./public/public_assets/css/');
}

watcher.on('ready', function () {
console.log('SCSS being watched');
buildSass();
});
watcher.on('change', function (filepath) {
console.log('file changed', filepath);
buildSass();
});
watcher.on('add', function (filepath) {
console.log('file added', filepath);
buildSass();
});
watcher.on('delete', function (filepath) {
console.log('file deleted', filepath);
buildSass();
});

This line seems to be the issue:

var watcher = new sane.Watcher('./components', {glob: ['*/.scss'], poll: true});

If poll: true is removed or set to false the build task does not run when
a file is saved even though the watcher.on('ready') is being fired. When poll:
true is set though it builds on save like it should.


Reply to this email directly or view it on GitHub
#30.

from sane.

dadambickford avatar dadambickford commented on May 28, 2024

We are not.

from sane.

amasad avatar amasad commented on May 28, 2024

What OS and version are you on? are you using any VMs?

from sane.

dadambickford avatar dadambickford commented on May 28, 2024

OS X Yosemite 10.10
Sane version 0.8.0, 0.8.1

Strangest damn thing is that a fresh setup of our repo on my partners machine does not yield the same problem.

from sane.

amasad avatar amasad commented on May 28, 2024

Can you try restarting your computer?
If that didn't work, go to OS X Activity Monitor, search for fseventd and stop it (it will restart itself instantly) and then try again? Let me know if that works

from sane.

dadambickford avatar dadambickford commented on May 28, 2024

Not working after both of those suggestions. I did see 3 other processes named 'dbfseventsd' though?

from sane.

amasad avatar amasad commented on May 28, 2024

does any other non-polling watching library work for you?

from sane.

dadambickford avatar dadambickford commented on May 28, 2024

We tried https://github.com/mikeal/watch but I think that polls as well, just super slowly. Any suggestions of one to try?

from sane.

amasad avatar amasad commented on May 28, 2024

try https://github.com/paulmillr/chokidar But make sure it's not in poll mode

from sane.

dadambickford avatar dadambickford commented on May 28, 2024

That actually did work with usePolling set to false. Any ideas?

from sane.

amasad avatar amasad commented on May 28, 2024

What version of node are you running?

On Friday, November 7, 2014, Adam Bickford [email protected] wrote:

That actually did work with usePolling set to false. Any ideas?


Reply to this email directly or view it on GitHub
#30 (comment).

from sane.

dadambickford avatar dadambickford commented on May 28, 2024

0.10.32

from sane.

dadambickford avatar dadambickford commented on May 28, 2024

Ok I'm not sure what affect this would have, but I had this weird loading bar start showing up on login (which appears I'm not the only one) and in looking for a solution to that one post suggested resetting the PRAM (holding cmd + opt + P + R on startup), and Sane appears to be working as normal again with the polling set to false. I'm not positive it's related, but either way it seems we can close this.

from sane.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.