master
Talon 2021-11-03 12:08:40 +01:00
parent 8013dd4a17
commit 36bb9264b3
5 changed files with 6454 additions and 0 deletions

6383
package-lock.json generated 100644

File diff suppressed because it is too large Load Diff

26
package.json 100644
View File

@ -0,0 +1,26 @@
{
"name": "assassin-bug",
"version": "1.0.0",
"description": "Text adventure for GitHub's Game Off 2021 jam",
"main": "webpack.config.js",
"scripts": {
"build": "webpack --mode production",
"dev": "webpack-dev-server --open --mode development"
},
"repository": {
"type": "git",
"url": "https://code.iamtalon.me/talon/assassin-bug"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"copy-webpack-plugin": "^9.0.1",
"html-webpack-plugin": "^5.5.0",
"webpack": "^5.61.0",
"webpack-dev-server": "^4.4.0"
},
"devDependencies": {
"webpack-cli": "^4.9.1"
}
}

View File

@ -0,0 +1,11 @@
<html>
<head>
<title>Assassin bug</title>
</head>
<body>
<h1>Assassin bug</h1>
<div id="output-area"></div>
<input type="text" id="input-area" placeholder="Type command" />
<script src="game.js"></script>
</body>
</html>

View File

@ -0,0 +1 @@
document.getElementById('output-area').appendChild(document.createTextNode("Hi I'm javascript and I approve this message"));

33
webpack.config.js 100644
View File

@ -0,0 +1,33 @@
const path = require('path');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const HTMLWebpackPlugin = require('html-webpack-plugin');
const Package = require('./package');
module.exports = {
entry: './src/game/index.js',
devtool: 'inline-source-map',
performance: {
hints: false
},
"plugins": [
new HTMLWebpackPlugin({
title: Package.name,
template: path.join(__dirname, "src/game/index.html")
}),
],
module: {
rules: [
{
test: /\.js?$/,
exclude: /node_modules/
}
]
},
resolve: {
extensions: [ '.ts', '.js' ]
},
output: {
filename: 'game.js',
path: path.resolve(__dirname, 'app_web')
}
};