Skip to content

Commit

Permalink
Merge branch 'master' into gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
JannisX11 committed Nov 2, 2023
2 parents 4b1ae74 + 9eb5292 commit b73d56b
Show file tree
Hide file tree
Showing 11 changed files with 37 additions and 16 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/webapp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: NodeJS with Webpack

on:
push:
branches: [ "gh-pages" ]
pull_request:
branches: [ "gh-pages" ]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x, 16.x, 18.x]

steps:
- uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Build
run: |
npm install
npm run prepublish
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
/dist/
index.php
electron-builder.env
node_modules/
node_modules/
js/bundle.js
workbox-*.js
service_worker.js
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ dist: trusty

language: node_js
node:
- 14
- 18

if: tag IS blank AND commit_message =~ ci-build

Expand All @@ -13,11 +13,13 @@ jobs:
os: osx
osx_image: "xcode12.5"
script:
- npm run prepublish
- electron-builder --publish=always

- name: "Linux"
os: linux
script:
- npm run prepublish
- sudo apt-get install rpm
- electron-builder --publish=onTagOrDraft

Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
<script src="lib/molang.umd.js"></script>
<script src="lib/wintersky.umd.js"></script>

<script src="js/webpack/bundle.js"></script>
<script src="js/bundle.js"></script>
<script src="js/preview/OrbitControls.js"></script>
<script src="js/util/util.js"></script>
<script src="js/util/math_util.js"></script>
Expand Down
1 change: 0 additions & 1 deletion js/webpack/bundle.js

This file was deleted.

7 changes: 0 additions & 7 deletions scripts/generate_pwa.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
const workbox = require('workbox-build');
const fs = require('fs');

let bundle_file = fs.readFileSync('./js/webpack/bundle.js', 'utf-8');
/*if (bundle_file.match(/</)) {
console.error('\x1b[31m', 'Invalid symbol detected in bundle');
process.exit(1);
}*/

workbox.generateSW({
cacheId: 'blockbench',
Expand Down
1 change: 0 additions & 1 deletion service_worker.js

This file was deleted.

2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = {
entry: './src/index.js',
output: {
filename: 'bundle.js',
path: PathModule.resolve(__dirname, 'js', 'webpack')
path: PathModule.resolve(__dirname, 'js')
},
module: {
rules: [
Expand Down
Loading

0 comments on commit b73d56b

Please sign in to comment.