forked from httpstatuses/httpstatuses
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.js
38 lines (35 loc) · 1.31 KB
/
build.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
37
38
var Metalsmith = require('metalsmith');
var branch = require('metalsmith-branch');
var sass = require('metalsmith-sass');
var fs = require('fs');
var metalsmith = Metalsmith(__dirname);
metalsmith
.source('contents')
.destination('build')
.use(branch('*.scss')
.use(sass())
)
.build(function (err) {
if (err) throw err;
fs.copyFile('build/style.css', 'src/Fluxera.HttpStatusCodes/wwwroot/css/style.css', (err) => {
if (err) throw err;
console.log('style.css was copied to wwwroot.');
});
fs.copyFile('build/open-sans-regular.woff', 'src/Fluxera.HttpStatusCodes/wwwroot/css/open-sans-regular.woff', (err) => {
if (err) throw err;
console.log('open-sans-regular.woff was copied to wwwroot.');
});
fs.copyFile('build/source-code-pro-700.woff', 'src/Fluxera.HttpStatusCodes/wwwroot/css/source-code-pro-700.woff', (err) => {
if (err) throw err;
console.log('source-code-pro-700.woff was copied to wwwroot.');
});
fs.copyFile('build/favicon.ico', 'src/Fluxera.HttpStatusCodes/wwwroot/favicon.ico', (err) => {
if (err) throw err;
console.log('favicon.ico was copied to wwwroot.');
});
fs.copyFile('build/robots.txt', 'src/Fluxera.HttpStatusCodes/wwwroot/robots.txt', (err) => {
if (err) throw err;
console.log('robots.txt was copied to wwwroot.');
});
console.log('Build successful!');
});