Update parcel

This commit is contained in:
Jonas Lochmann 2022-07-25 02:00:00 +02:00
parent ecb3d14d2a
commit 2f0ca96d7d
No known key found for this signature in database
GPG key ID: 8B8C9AEE10FA5B36
5 changed files with 4927 additions and 6132 deletions

2
.gitignore vendored
View file

@ -1,3 +1,3 @@
node_modules
dist
.cache
.parcel-cache

10
finish-build.mjs Normal file
View file

@ -0,0 +1,10 @@
import { readFileSync, writeFileSync } from 'fs'
const htmlFilePath = new URL('dist/index.html', import.meta.url)
writeFileSync(
htmlFilePath,
readFileSync(htmlFilePath)
.toString('utf8')
.replace(' type="module"', '')
)

11037
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,14 +1,12 @@
{
"dependencies": {
"parcel-bundler": "^1.12.4"
},
"scripts": {
"develop": "parcel src/index.html",
"lint": "tslint --project .",
"lint:fix": "tslint --project . --fix",
"build": "tslint --project . && rimraf dist && parcel build src/index.html --no-source-maps --no-minify --no-cache --public-url ."
"build": "tslint --project . && rimraf dist && parcel build src/index.html --no-source-maps --no-optimize --no-cache --public-url . && node finish-build.mjs"
},
"devDependencies": {
"parcel": "^2.6.2",
"rimraf": "^3.0.1",
"tslint": "^6.0.0",
"tslint-config-standard": "^9.0.0",

View file

@ -1,13 +1,13 @@
<html>
<head>
<title>TimeLimit Admin</title>
<link rel="stylesheet" href="/style.css">
<link rel="stylesheet" href="./style.css">
</head>
<body>
<div class="container">
<div id="app"></div>
</div>
<script src="./index.ts"></script>
<script src="./index.ts" type="module"></script>
</body>
</html>