title: Compiling scss into css using node-sass with Node.js
body: <p>I'm trying to compile my scss file into css file using node-sass , I already know how to do this with Command line.
  I have this <code>npm-script</code> In my <code>package.json</code> file : </p>
  
  <pre><code>"scripts": {
  "scss": "node-sass --watch fileName/scss -o FileName/css"
  }
  </code></pre>
  
  <p>and when I run :</p>
  
  <pre><code>npm run scss
  </code></pre>
  
  <p>it works fine.
  What I want to know is how to use (from the <a href="https://www.npmjs.com/package/node-sass" rel="nofollow noreferrer">node-sass</a> project page) :</p>
  
  <pre><code>var sass = require('node-sass');
  
  sass.render({
    file: scss_filename,
    [, options..]
  }, function(err, result) { /*...*/ });
  </code></pre>
  
  <p>I try this in my <code>app.js</code> :</p>
  
  <pre><code>var sass = require('node-sass');
  
  sass.render({
    file: __dirname + '/scss/style.scss',
    outFile: __dirname + '/css/style.css',
  }); 
  </code></pre>
  
  <p>but it's not working, I have little experience with this and I can use some help. </p>