mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
refactor(es modules): deploy setup
This commit is contained in:
parent
ad252b54e6
commit
f9aeaddf52
3 changed files with 21 additions and 4 deletions
17
deploy.sh
Normal file
17
deploy.sh
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
# abort on errors
|
||||||
|
set -e
|
||||||
|
|
||||||
|
npm run build
|
||||||
|
|
||||||
|
cd dist
|
||||||
|
|
||||||
|
git init
|
||||||
|
git checkout -b master
|
||||||
|
git add -A
|
||||||
|
git commit -m 'deploy'
|
||||||
|
|
||||||
|
git push -f git@github.com:Azgaar/Fantasy-Map-Generator.git main:gh-pages
|
||||||
|
|
||||||
|
cd -
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
// round value to d decimals
|
// round value to n decimals
|
||||||
export function rn(value: number, decimals: number = 0) {
|
export function rn(value: number, decimals: number = 0) {
|
||||||
const multiplier = Math.pow(10, decimals);
|
const multiplier = Math.pow(10, decimals);
|
||||||
return Math.round(value * multiplier) / multiplier;
|
return Math.round(value * multiplier) / multiplier;
|
||||||
|
|
@ -17,5 +17,3 @@ export function lim(value: number) {
|
||||||
export function normalize(val: number, min: number, max: number) {
|
export function normalize(val: number, min: number, max: number) {
|
||||||
return minmax((val - min) / (max - min), 0, 1);
|
return minmax((val - min) / (max - min), 0, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// import {rn, minmax, lim, normalize} from '/src/utils/numberUtils';
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
import {defineConfig} from "vite";
|
import {defineConfig} from "vite";
|
||||||
|
|
||||||
export default defineConfig({});
|
export default defineConfig({
|
||||||
|
base: "/Fantasy-Map-Generator/"
|
||||||
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue