forked from domske/state-stepper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
prebuild.js
36 lines (29 loc) · 932 Bytes
/
prebuild.js
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
28
29
30
31
32
33
34
35
36
/**
* https://github.com/domske/state-stepper/issues/1
* Until there are Angular compiler issues, it's only possible to embed the html and css string.
* This is horrible. But currenlty there is no other known solution.
*/
const fs = require('fs-extra');
fs.removeSync('./dist');
// const sass = require('node-sass');
// const fs = require('fs');
// const filePath = './src/components/state-stepper/state-stepper.component';
// /**
// * SCSS
// */
// {
// const result = sass.renderSync({
// file: filePath + '.scss'
// });
// let css = Buffer.from(result.css).toString('utf8');
// css = 'export default `' + css + '`';
// fs.writeFileSync(filePath + '.css.ts', css);
// }
// /**
// * HTML
// */
// {
// const result = fs.readFileSync(filePath + '.html');
// const html = 'export default `' + result + '`';
// fs.writeFileSync(filePath + '.html.ts', html);
// }