Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
**/node_modules/*
**/certs/*
**/.DS_Store
dist/
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:20-alpine as build
FROM node:20-alpine AS build

ARG REACT_APP_SERVICES_HOST=/services/m

Expand Down
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,19 +70,19 @@ Compile from source:

```shell
# Clone the repository
> git clone https://github.com/ckabalan/visualsubnetcalc
git clone https://github.com/ckabalan/visualsubnetcalc
# Change to the repository directory
> cd visualsubnetcalc
cd visualsubnetcalc
# Use recommended NVM version
> nvm use
nvm use
# Change to the sources directory
> cd src
cd src
# Install Bootstrap
> npm install
npm install
# Compile Bootstrap (Also install sass command line globally)
> npm run build
npm run build
# Run the local webserver
> npm start
npm start
```

The full application should then be available within `./dist/`, open `./dist/index.html` in a browser.
Expand All @@ -94,15 +94,15 @@ The full application should then be available within `./dist/`, open `./dist/ind
```shell

#Install mkcert
> brew install mkcert
brew install mkcert
# generate CA Certs to be trusted by local browsers
> mkcert install
mkcert install
# generate certs for local development
> cd visualsubnetcalc/src
cd visualsubnetcalc/src
# generate certs for local development
> npm run setup:certs
npm run setup:certs
# run the local webserver with https
> npm run local-secure-start
npm run local-secure-start
```

## Running in a container
Expand Down
5 changes: 0 additions & 5 deletions dist/css/bootstrap.min.css

This file was deleted.

1 change: 0 additions & 1 deletion dist/css/bootstrap.min.css.map

This file was deleted.

1 change: 0 additions & 1 deletion dist/js/lz-string.min.js

This file was deleted.

8 changes: 6 additions & 2 deletions src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@
"dependencies": {
"bootstrap": "^5.3.6",
"http-server": "^14.1.1",
"jquery": "^3.7.1",
"jquery-validation": "^1.21.0",
"lz-string": "^1.5.0"
},
"scripts": {
"postinstall": "npm install -g sass@1.77.6",
"build": "sass --style compressed scss/custom.scss:../dist/css/bootstrap.min.css && cp node_modules/lz-string/libs/lz-string.min.js ../dist/js/lz-string.min.js",
"process-sass": "npx sass --style compressed scss/custom.scss:../dist/css/bootstrap.min.css",
"copy-js-deps": "mkdir -p ../dist/js && cp node_modules/lz-string/libs/lz-string.min.js ../dist/js/lz-string.min.js && cp node_modules/bootstrap/dist/js/bootstrap.bundle.min.js ../dist/js/bootstrap.bundle.min.js && cp node_modules/jquery/dist/jquery.min.js ../dist/js/jquery.min.js && cp node_modules/jquery-validation/dist/jquery.validate.min.js ../dist/js/jquery.validate.min.js && cp node_modules/jquery-validation/dist/additional-methods.min.js ../dist/js/additional-methods.min.js",
"copy-static": "cp -r static/* ../dist/",
"build": "npm run process-sass && npm run copy-js-deps && npm run copy-static",
"test": "npx playwright test",
"setup:certs": "mkdir -p certs; mkcert -cert-file certs/cert.pem -key-file certs/cert.key localhost 127.0.0.1",
"start": "node node_modules/http-server/bin/http-server ../dist -c-1",
Expand Down
16 changes: 4 additions & 12 deletions dist/404.html → src/static/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,10 @@ <h1>Visual Subnet Calculator | 404 - Page Not Found</h1>
<p class="text-muted">
If you believe this is an error, please <a href="https://github.com/ckabalan/visualsubnetcalc/issues" target="_blank" rel="noopener noreferrer">open an issue</a> on GitHub.
</p>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"
integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL"
crossorigin="anonymous"></script>
<script src="https://code.jquery.com/jquery-3.7.0.min.js"
integrity="sha256-2Pmvv0kuTBOenSvLm6bvfBSSHrUJ+3A7x6P5Ebd07/g="
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/jquery-validation@1.20.1/dist/jquery.validate.min.js"
integrity="sha256-0xVRcEF27BnewkTwGDpseENfeitZEOsQAVSlDc7PgG0="
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/jquery-validation@1.20.1/dist/additional-methods.min.js"
integrity="sha384-Wxa7enUK34eRCZgjQIh81NeuzGHX2YaEkcLPCBIvASsdqlXBtAvVUiM7Tb56UvtC"
crossorigin="anonymous"></script>
<script src="js/bootstrap.bundle.min.js"></script>
<script src="js/jquery.min.js"></script>
<script src="js/jquery.validate.min.js"></script>
<script src="js/additional-methods.min.js"></script>
<script src="js/lz-string.min.js"></script>
<script src="js/main.js"></script>
</div>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
"short_name": "Visual Subnet Calc",
"icons": [
{
"src": "icon/android-chrome-192x192.png",
"src": "android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "icon/android-chrome-512x512.png",
"src": "android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
Expand All @@ -17,3 +17,4 @@
"background_color": "#ffffff",
"display": "standalone"
}

File renamed without changes
File renamed without changes
Loading