Move build output to `dist/`

This commit is contained in:
Florine W. Dekker 2020-05-03 20:52:28 +02:00
parent 8f859a50eb
commit 2c4b1c29e5
Signed by: FWDekker
GPG Key ID: B1B567AF58D6EE0F
5 changed files with 14 additions and 13 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
## Node
# Logs
logs
*.log

View File

@ -4,25 +4,25 @@ module.exports = grunt => {
grunt.initConfig({
pkg: grunt.file.readJSON("package.json"),
clean: {
default: [".nyc_output/", "build/"]
default: [".nyc_output/", "dist/"]
},
copy: {
images: {
files: [{expand: true, cwd: "src/main/", src: ["**/*.png", "**/*.ico"], dest: "build/"}]
files: [{expand: true, cwd: "src/main/", src: ["**/*.png", "**/*.ico"], dest: "dist/"}]
},
html: {
files: [{expand: true, cwd: "src/main/", src: "**/*.html", dest: "build/"}]
files: [{expand: true, cwd: "src/main/", src: "**/*.html", dest: "dist/"}]
},
css: {
files: [{expand: true, cwd: "src/main/", src: "**/*.css", dest: "build/"}]
files: [{expand: true, cwd: "src/main/", src: "**/*.css", dest: "dist/"}]
},
pwa: {
files: [{expand: true, cwd: "src/main/", src: ["manifest.json", "sw.js"], dest: "build/"}]
files: [{expand: true, cwd: "src/main/", src: ["manifest.json", "sw.js"], dest: "dist/"}]
}
},
replace: {
dev: {
src: ["./build/*.js"],
src: ["./dist/*.js"],
replacements: [
{
from: "%%VERSION_NUMBER%%",
@ -32,7 +32,7 @@ module.exports = grunt => {
overwrite: true
},
deploy: {
src: ["./build/*.js"],
src: ["./dist/*.js"],
replacements: [
{
from: "%%VERSION_NUMBER%%",
@ -59,7 +59,7 @@ module.exports = grunt => {
},
output: {
filename: "bundle.js",
path: path.resolve(__dirname, "build/"),
path: path.resolve(__dirname, "dist/"),
}
},
dev: {

View File

@ -13,9 +13,9 @@ $> npm ci
### Building
```shell script
# Build the application in `build/` for development
# Build the application in `dist/` for development
$> npm run dev
# Build the application in `build/` for deployment
# Build the application in `dist/` for deployment
$> npm run deploy
# Remove build files
$> npm run clean

View File

@ -1,9 +1,9 @@
{
"name": "fwdekker.com",
"version": "0.33.7",
"version": "0.33.8",
"description": "The source code of [my personal website](https://fwdekker.com/).",
"author": "Felix W. Dekker",
"browser": "bundle.js",
"browser": "dist/bundle.js",
"repository": {
"type": "git",
"url": "git@git.fwdekker.com:FWDekker/fwdekker.com.git"

View File

@ -3,7 +3,7 @@
"target": "es2019",
"strict": true,
"rootDir": "./src/main/js/",
"outDir": "./build/js/"
"outDir": "./dist/js/"
},
"include": [
"src/main/js/**/*.ts"