Welcome to mirror list, hosted at ThFree Co, Russian Federation.

index.js « node « scss « examples - github.com/twbs/rfs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 77baa8e1561cbe8d54c69024d392df196fbcbe4d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
'use strict';

const fs = require('fs');
const path = require('path');
const sass = require('node-sass');

sass.render({
  file: path.join(__dirname, '/src/main.scss'),
  outFile: path.join(__dirname, '/dest/main.css')
}, (error, result) => { // Node-style callback from v3.0.0 onwards
  if (error) {
    throw error;
  } else {
    // No errors during the compilation, write this result on the disk
    fs.writeFile(path.join(__dirname, '/dest/main.css'), result.css, err => {
      if (err) {
        throw err;
      } else {
        console.log('Responsive font sizes generated.');
      }
    });
  }
}
);