Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>Note:</strong> I am not presenting any complete solution and I am no JavaScript programmer</p> <p><strong>Section on grunt.js issue on watching file</strong></p> <p>Source: <a href="https://github.com/cowboy/grunt/blob/master/tasks/watch.js" rel="nofollow">https://github.com/cowboy/grunt/blob/master/tasks/watch.js</a></p> <p>Section where it performs watching of file. It uses fs.statSync (Synchronous stat):</p> <pre><code>// Get last modified time of file. mtime = +fs.statSync(filepath).mtime; // If same as stored mtime, the file hasn't changed. if (mtime === mtimes[filepath]) { return; } // Otherwise it has, store mtime for later use. mtimes[filepath] = mtime; } </code></pre> <p>It uses "fs" functionality from node.js: <a href="http://nodejs.org/api/fs.html#fs_class_fs_stats" rel="nofollow">http://nodejs.org/api/fs.html#fs_class_fs_stats</a></p> <p>Among various data on file, it returns following time attributes:</p> <pre><code>atime: Mon, 10 Oct 2011 23:24:11 GMT, mtime: Mon, 10 Oct 2011 23:24:11 GMT, ctime: Mon, 10 Oct 2011 23:24:11 GMT </code></pre> <p>So conclusion is that it uses stat. You can write a simple js file leveraging fs from node.js to check the <code>fs.statSync</code> result before and after changing the file in a shared folder. </p> <p>This would establish if you should be watching file with watcher utility from grunt.js.</p> <p><strong>A little note on shared folders in VirtualBox</strong></p> <p>Use it for convenience as vagrant does to share the puppet configuration files and applying it on the VM, once the VM has started. Its is known issue that VirtualBox shared folder performance degrades quickly as the number of files in the shared folder increases.</p> <p>For any heavy duty lifting, use other mechanisms to store files on regular directories in your VM. Use NFS shared folder.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload