modified template

Signed-off-by: Pascal Syma <pascal@syma.dev>
This commit is contained in:
2020-05-18 12:59:59 +02:00
parent 01939b8ed8
commit 4a22dbe657
10 changed files with 118 additions and 45 deletions
Vendored
+48
View File
@@ -0,0 +1,48 @@
pipeline {
agent {
label 'node&&windows'
}
stages {
stage ('Initialize') {
steps {
echo 'Initializing..'
}
}
stage('Build') {
steps {
echo 'Building..'
bat 'npm install'
bat 'npm run build'
}
}
stage('Test') {
steps {
echo 'Testing..'
}
}
stage('Archive') {
when {
branch 'master'
expression {
currentBuild.result == null || currentBuild.result == 'SUCCESS'
}
}
steps {
echo 'Deploying....'
dir("dist") {
bat 'git init'
bat 'git add .'
bat 'git config --global user.email "jenkins@bosym.de"'
bat 'git config --global user.name "Jenkins"'
bat 'git commit -m "Deploy by Jenkins"'
withCredentials([usernamePassword(credentialsId: 'e3d97a6f-476f-489f-a207-4766a1c420cf', usernameVariable: 'username', passwordVariable: 'password')])
{
bat "git push --force --quiet \"https://$username:$password@git.bosym.de/Pascal/MI2Mario.git\" master:gh-pages"
}
}
deleteDir()
}
}
}
}
+1 -1
View File
@@ -1,4 +1,4 @@
# Phaser 3 Webpack Project Template
# Medieninformatik 2 SoSe 2020 Mario
A Phaser 3 project template with ES6 support via [Babel 7](https://babeljs.io/) and [Webpack 4](https://webpack.js.org/)
that includes hot-reloading for development and production-ready builds.
+21 -16
View File
@@ -1,19 +1,24 @@
<!--
~ Copyright (c) 2020. Pascal Syma <pascal@syma.dev>
~ All rights reserved.
-->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Phaser 3 Template</title>
<style>
html,
body {
height: 100%;
margin: 0;
background-color: gray;
/*TODO: Change to black later on: background-color: black;*/
overflow: hidden;
}
</style>
</head>
<body>
</body>
<head>
<meta charset="utf-8">
<title>MI2Mario</title>
<style>
html,
body {
height: 100%;
margin: 0;
background-color: gray;
/*TODO: Change to black later on: background-color: black;*/
overflow: hidden;
}
</style>
</head>
<body>
</body>
</html>
+1 -1
View File
@@ -1,5 +1,5 @@
{
"name": "phaser3-project-template",
"name": "mi2-mario",
"version": "2.1.0",
"lockfileVersion": 1,
"requires": true,
+5 -5
View File
@@ -1,7 +1,7 @@
{
"name": "phaser3-project-template",
"name": "mi2-mario",
"version": "2.1.0",
"description": "A Phaser 3 Project Template",
"description": "Medieninformatik 2 SoSe 2020 Mario",
"main": "src/index.js",
"scripts": {
"build": "webpack --config webpack/prod.js ",
@@ -9,7 +9,7 @@
},
"repository": {
"type": "git",
"url": "git+https://git.bosym.de/git/Pascal/phaser3-project-template.git"
"url": "git+https://git.bosym.de/git/Pascal/MI2Mario.git"
},
"author": "Pascal Syma <pascal@syma.dev> (https://syma.dev)",
"contributors": [
@@ -22,9 +22,9 @@
"license": "MIT",
"licenseUrl": "http://www.opensource.org/licenses/mit-license.php",
"bugs": {
"url": "https://git.bosym.de/Pascal/phaser3-project-template/issues"
"url": "https://git.bosym.de/Pascal/MI2Mario/issues"
},
"homepage": "https://git.bosym.de/Pascal/phaser3-project-template#readme",
"homepage": "https://git.bosym.de/Pascal/MI2Mario#readme",
"devDependencies": {
"@babel/core": "^7.7.2",
"@babel/preset-env": "^7.7.1",
Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

After

Width:  |  Height:  |  Size: 111 KiB

+5
View File
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2020. Pascal Syma <pascal@syma.dev>
* All rights reserved.
*/
import Phaser from "phaser";
import Menu from "./scenes/Menu";
+5
View File
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2020. Pascal Syma <pascal@syma.dev>
* All rights reserved.
*/
import logoImg from "../assets/logo.png";
export default class Menu extends Phaser.Scene {
+7 -2
View File
@@ -1,3 +1,8 @@
/*
* Copyright (c) 2020. Pascal Syma <pascal@syma.dev>
* All rights reserved.
*/
const webpack = require("webpack");
const path = require("path");
const HtmlWebpackPlugin = require("html-webpack-plugin");
@@ -41,8 +46,8 @@ module.exports = {
logo: './public/favicon.png',
publicPath: "./",
favicons: {
appName: 'coop-platformer',
appDescription: 'Phaser3 Template',
appName: 'mi2mario',
appDescription: 'MI2Mario',
developerName: 'Pascal Syma',
developerURL: "https://syma.dev",
background: '#000',
+25 -20
View File
@@ -1,27 +1,32 @@
/*
* Copyright (c) 2020. Pascal Syma <pascal@syma.dev>
* All rights reserved.
*/
const merge = require("webpack-merge");
const path = require("path");
const base = require("./base");
const TerserPlugin = require("terser-webpack-plugin");
module.exports = merge(base, {
mode: "production",
output: {
filename: "bundle.min.js"
},
devtool: false,
performance: {
maxEntrypointSize: 900000,
maxAssetSize: 900000
},
optimization: {
minimizer: [
new TerserPlugin({
terserOptions: {
output: {
comments: false
}
}
})
]
}
mode: "production",
output: {
filename: "bundle.min.js"
},
devtool: false,
performance: {
maxEntrypointSize: 900000,
maxAssetSize: 900000
},
optimization: {
minimizer: [
new TerserPlugin({
terserOptions: {
output: {
comments: false
}
}
})
]
}
});