blob: b263c936e020750e0895c18252f3139aaf0bb992 (
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
25
26
27
|
'use strict';
const fs = require('fs');
const path = require('path');
const less = require('less');
const str = fs.readFileSync(path.join(__dirname, '/src/main.less'), 'utf8');
less.render(
str,
{
paths: [path.join(__dirname, '/src')]
}
).then(
output => {
fs.writeFile(path.join(__dirname, '/dest/main.css'), output.css, err => {
if (err) {
throw err;
} else {
console.log('Responsive font sizes generated.');
}
});
},
error => {
throw error;
}
);
|