1
0
Fork 0
mirror of https://github.com/Luzifer/past3.git synced 2024-11-09 16:30:01 +00:00

Use babel to minify and transpile

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2018-09-24 13:00:18 +02:00
parent 7e15147f50
commit 6f0a3d068d
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E
5 changed files with 1280 additions and 3 deletions

20
.babelrc Normal file
View file

@ -0,0 +1,20 @@
{
"presets": [
[
"env",
{
"targets": {
"browsers": [
"last 3 versions",
"Safari >= 10",
"not ie <= 8",
"Edge >= 12",
"iOS >= 10",
"Android >= 4.4"
]
}
}
],
"minify"
]
}

1
.gitignore vendored
View file

@ -1 +1,2 @@
node_modules
public public

View file

@ -3,9 +3,8 @@ default: generate
generate: script index-page generate: script index-page
script: public script: public
coffee --bare --compile --output public app.coffee docker run --rm -ti -v $(CURDIR):$(CURDIR) -w $(CURDIR) node:alpine \
python -m jsmin public/app.js > public/app.min.js sh -exc "npm ci && npx coffee -t -c -o public/app.js app.coffee && chown -R $(shell id -u) public && rm -rf node_modules"
mv public/app.min.js public/app.js
index-page: public index-page: public
./generate.py > public/index.html ./generate.py > public/index.html

1246
package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

11
package.json Normal file
View file

@ -0,0 +1,11 @@
{
"name": "past3",
"version": "0.0.0",
"internal": true,
"devDependencies": {
"babel-core": "^6.26.3",
"babel-preset-env": "^1.7.0",
"babel-preset-minify": "^0.4.3",
"coffeescript": "^2.3.1"
}
}