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: 1d7f4d5f61aac82aec39c12b7abb8756760ea8d6 (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;
  }

  // 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;
    }

    console.log('Responsive font sizes generated.');
  });
}
);