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

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

const fs = require('fs');
const path = require('path');
const stylus = require('stylus');

const str = fs.readFileSync(path.join(__dirname, '/src/main.styl'), 'utf8');

stylus.render(str, {
  filename: path.join(__dirname, '/src/main.styl')
}, (err, css) => {
  if (err) {
    throw err;
  }

  fs.writeFile(path.join(__dirname, '/dest/main.css'), css, err => {
    if (err) {
      throw err;
    }

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