-
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
10 changed files
with
96 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"presets": [ | ||
"@babel/preset-env" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,35 @@ | ||
{ | ||
"name": "royalur-net", | ||
"author": { | ||
"name": "Paddy Lamont", | ||
"email": "[email protected]", | ||
"url": "https://github.com/Sothatsit" | ||
}, | ||
"description": "A free and open-source website to let people play and learn about The Royal Game of Ur.", | ||
"version": "1.0.0", | ||
"license": "GPL-3.0-or-later", | ||
"homepage": "https://royalur.net", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/Sothatsit/RoyalUrClient.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/Sothatsit/RoyalUrClient/issues" | ||
}, | ||
"private": "true", | ||
"scripts": { | ||
"build": "webpack --mode production" | ||
}, | ||
"devDependencies": { | ||
"@babel/cli": "^7.12.1", | ||
"@babel/core": "^7.12.3", | ||
"@babel/preset-env": "^7.12.1", | ||
"autoprefixer": "^10.2.5", | ||
"postcss-cli": "^8.3.1", | ||
"postcss-preset-env": "^6.7.0", | ||
"uglify-js": "^3.11.5", | ||
"uglifycss": "^0.0.29" | ||
"terser-webpack-plugin": "*", | ||
"uglifycss": "^0.0.29", | ||
"webpack": "^5.4.0", | ||
"webpack-cli": "^4.2.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
const path = require("path"), | ||
TerserPlugin = require("terser-webpack-plugin"); | ||
|
||
/** Returns an absolute path of a file relative to this config. **/ | ||
function abs(...args) { | ||
return path.resolve.apply(this, [__dirname].concat(args)); | ||
} | ||
|
||
/** Joins several relative file pieces into one relative file path. **/ | ||
function rel(...args) { | ||
return "./" + path.join.apply(this, args); | ||
} | ||
|
||
module.exports = { | ||
output: { | ||
path: abs('build', 'js') | ||
}, | ||
entry: { | ||
home: { | ||
import: rel('src', 'home', 'home.js'), | ||
filename: rel('index.js') | ||
}, | ||
game: { | ||
import: rel('src', 'game', 'client.js'), | ||
filename: rel('game', 'index.js') | ||
}, | ||
gameWorker: { | ||
import: rel('src', 'game', 'game', 'computer_worker.js'), | ||
filename: rel('game', 'computer_worker.js') | ||
}, | ||
gameResources: { | ||
import: rel('src', 'game', 'game_resources.js'), | ||
filename: rel('game', 'resources.js') | ||
}, | ||
articles: { | ||
import: rel('src', 'articles', 'base', 'articles.js'), | ||
filename: rel('articles.js') | ||
}, | ||
dice: { | ||
import: rel('src', 'articles', 'learn', 'dice.js'), | ||
filename: rel('dice', 'index.js') | ||
} | ||
}, | ||
optimization: { | ||
minimize: true, | ||
minimizer: [ | ||
new TerserPlugin({ | ||
terserOptions: { | ||
mangle: false | ||
} | ||
}) | ||
|
||
] | ||
}, | ||
}; |