forked from Patchx/boilerplate_netlify_repo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.js
23 lines (21 loc) · 868 Bytes
/
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
console.log('js file build');
var Metalsmith = require('metalsmith');
var in_place = require('metalsmith-in-place');
Metalsmith(__dirname) // __dirname defined by node.js:
// name of current working directory
.metadata({ // add any variable you want
// use them in layout-files
sitename: "boilerplate site",
siteurl: "http://example.com",
description: "",
generatorname: "Metalsmith",
generatorurl: "http://metalsmith.io/"
})
.source('./src') // source directory
.destination('./build') // destination directory
.clean(true) // clean destination before
.use(in_place()) // wrap layouts around html
.build(function(err) { // build process
if (err) throw err; // error handling is required
}
);