Minify CSS
This commit is contained in:
parent
840885841e
commit
281c704db2
3 changed files with 9 additions and 1 deletions
8
index.js
8
index.js
|
@ -447,6 +447,14 @@ app.get('/', async (req, res) => {
|
|||
res.send(minify.minify(html))
|
||||
})
|
||||
|
||||
app.get('/style.css', async (req, res) => {
|
||||
var cssPath = path.join(resourcePath, 'style.css')
|
||||
var css = fs.readFileSync(cssPath).toString()
|
||||
css = minify.minify(css)
|
||||
res.send(css)
|
||||
console.log(css)
|
||||
})
|
||||
|
||||
app.use((req, res, next) => {
|
||||
res.status(404).send(`
|
||||
<link rel="stylesheet" href="/style.css">
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<link rel="stylesheet" href="./style.css">
|
||||
<link rel="stylesheet" href="/style.css">
|
||||
|
||||
<title>Violet's Purgatory</title>
|
||||
|
||||
|
|
Loading…
Reference in a new issue