mirror of
https://github.com/penpot/penpot.git
synced 2025-12-12 06:24:17 +01:00
🐛 Restore css hot-reloading.
This commit is contained in:
@@ -44,6 +44,14 @@ function scssPipeline(options) {
|
||||
});
|
||||
};
|
||||
|
||||
const touch = (_path) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
return fs.utimes(file.path, new Date(), new Date(), () => {
|
||||
resolve(_path);
|
||||
});
|
||||
})
|
||||
};
|
||||
|
||||
const render = (input) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
sass.render({file: input}, async function(err, result) {
|
||||
@@ -69,7 +77,11 @@ function scssPipeline(options) {
|
||||
return mkdirp(path.dirname(output))
|
||||
.then(() => render(input))
|
||||
.then((res) => postprocess(res, input, output))
|
||||
.then((res) => write(output, res))
|
||||
.then(async (res) => {
|
||||
await write(output, res);
|
||||
await touch(output);
|
||||
return res;
|
||||
})
|
||||
.catch((err) => null)
|
||||
.then(() => {
|
||||
next();
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
{:target :browser
|
||||
:output-dir "resources/public/js/"
|
||||
:asset-path "/js"
|
||||
:devtools {:browser-inject :main}
|
||||
:devtools {:browser-inject :main
|
||||
:watch-dir "resources/public"}
|
||||
:build-options {:manifest-name "manifest.json"}
|
||||
|
||||
:modules
|
||||
|
||||
Reference in New Issue
Block a user