You've already forked 98.css
mirror of
https://github.com/jdan/98.css.git
synced 2026-05-05 06:01:22 +09:00
add chokidar and npm start
This commit is contained in:
20
build.js
20
build.js
@@ -19,15 +19,14 @@ function buildCSS() {
|
||||
from: "style.css",
|
||||
to: "dist/98.css",
|
||||
map: { inline: false },
|
||||
})
|
||||
.then((result) => {
|
||||
mkdirp.sync("dist");
|
||||
fs.writeFileSync("dist/98.css", result.css);
|
||||
fs.writeFileSync("dist/98.css.map", result.map);
|
||||
});
|
||||
}
|
||||
|
||||
function writeCSS(result) {
|
||||
mkdirp.sync("dist");
|
||||
fs.writeFileSync("dist/98.css", result.css);
|
||||
fs.writeFileSync("dist/98.css.map", result.map);
|
||||
}
|
||||
|
||||
function buildDocs() {
|
||||
let id = 0;
|
||||
function getNewId() {
|
||||
@@ -67,4 +66,11 @@ function buildDocs() {
|
||||
);
|
||||
}
|
||||
|
||||
buildCSS().then(writeCSS).then(buildDocs);
|
||||
function build() {
|
||||
buildCSS()
|
||||
.then(buildDocs)
|
||||
.catch((err) => console.log(err));
|
||||
}
|
||||
module.exports = build;
|
||||
|
||||
build();
|
||||
|
||||
Reference in New Issue
Block a user