diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..c59d1b3 --- /dev/null +++ b/Jenkinsfile @@ -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() + } + } + } +} \ No newline at end of file diff --git a/README.md b/README.md index 4ed575d..75f3275 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/index.html b/index.html index a4c5106..9081e0f 100644 --- a/index.html +++ b/index.html @@ -1,19 +1,24 @@ + + - - - Phaser 3 Template - - - - + + + MI2Mario + + + + diff --git a/package-lock.json b/package-lock.json index 0c6018f..c55ad70 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "phaser3-project-template", + "name": "mi2-mario", "version": "2.1.0", "lockfileVersion": 1, "requires": true, diff --git a/package.json b/package.json index cb9f943..66ed01a 100644 --- a/package.json +++ b/package.json @@ -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 (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", diff --git a/public/favicon.png b/public/favicon.png index 25233a5..a789abc 100644 Binary files a/public/favicon.png and b/public/favicon.png differ diff --git a/src/index.js b/src/index.js index 8425b3f..f0b5de3 100644 --- a/src/index.js +++ b/src/index.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2020. Pascal Syma + * All rights reserved. + */ + import Phaser from "phaser"; import Menu from "./scenes/Menu"; diff --git a/src/scenes/Menu.js b/src/scenes/Menu.js index 4f9dd73..6bf623e 100644 --- a/src/scenes/Menu.js +++ b/src/scenes/Menu.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2020. Pascal Syma + * All rights reserved. + */ + import logoImg from "../assets/logo.png"; export default class Menu extends Phaser.Scene { diff --git a/webpack/base.js b/webpack/base.js index 19dc8ab..a622121 100644 --- a/webpack/base.js +++ b/webpack/base.js @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2020. Pascal Syma + * 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', diff --git a/webpack/prod.js b/webpack/prod.js index 7d2a8d5..8284a70 100644 --- a/webpack/prod.js +++ b/webpack/prod.js @@ -1,27 +1,32 @@ +/* + * Copyright (c) 2020. Pascal Syma + * 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 + } + } + }) + ] + } });