Updated build script. Supports SCSS now.

This commit is contained in:
Alexander Bass 2022-06-24 13:11:18 -04:00
parent ad26bba835
commit d88bb557dc
10 changed files with 15 additions and 230 deletions

5
.gitignore vendored
View file

@ -1,2 +1,3 @@
*node_modules/*
*dist/*
*node_modules*
*dist*
*.sass-cache*

10
build.sh Normal file
View file

@ -0,0 +1,10 @@
rm -rf dist
mkdir -p dist/server
mkdir -p dist/www/
scss client/scss/main.scss dist/www/style.css
cp -r client/www/* dist/www
rm -rf .sass-cache
npx tsc
echo "Starting server......."
echo "~-+/\________________/==o=O=o==\________________/\+-~"
node dist/server/main.js

Binary file not shown.

Binary file not shown.

View file

@ -1,213 +0,0 @@
/* #mydiv {
position: absolute;
cursor: move;
z-index: 10;
background: coral;
width: 30px;
height: 30px;
border: 1px solid #d3d3d3;
} */
span.button > img {
pointer-events: none;
image-rendering: optimizeSpeed; /* STOP SMOOTHING, GIVE ME SPEED */
image-rendering: -moz-crisp-edges; /* Firefox */
image-rendering: -o-crisp-edges; /* Opera */
image-rendering: -webkit-optimize-contrast; /* Chrome (and eventually Safari) */
image-rendering: pixelated; /* Chrome */
-ms-interpolation-mode: nearest-neighbor; /* IE8+ */
width: 70px;
height: 70px;
transform: translate(0, 8px);
border: 2px solid darkgray;
border-radius: 4px;
background: lightgray;
}
span.button {
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
display: inline-block;
background: tan;
width:90px;
height:90px;
margin: 5px 5px 5px 5px;
vertical-align: middle;
border-radius: 3px;
white-space: normal;
align-items: center;
cursor: pointer;
}
span.button:hover {
background: gray;
}
.canvas1{
z-index: 0;
}
.canvas3 {
z-index: 2;
}
.canvasStack {
/* top: 50px; */
background: darkslategray;
}
#wrapper {
/* display: flex; */
/* justify-content: right; */
/* left: 50%; */
/* transform: translate(-50%, 0); */
/* position: absolute; */
background: khaki;
width: 750px;
height: 750px;
}
#wrapwrap {
display: block;
margin: 0 auto;
margin-left: auto;
margin-right: auto;
}
main {
margin-left: auto;
margin-right: auto;
}
canvas {
-webkit-user-select: none; /* Chrome all / Safari all */
-moz-user-select: none; /* Firefox all */
-ms-user-select: none; /* IE 10+ */
-o-user-select: none;
user-select: none;
image-rendering: -moz-crisp-edges;
image-rendering: -webkit-crisp-edges;
image-rendering: pixelated;
image-rendering: crisp-edges;
}
.hidden {
display: none;
}
body {
text-align: center;
background-color: #2c2f33;
color: white;
font-variant: normal;
font-family: verdana;
}
h1 {
font-size: 25pt;
}
h2 {
font-size: 20pt;
}
p{
/* font-size: 12pt; */
/* text-align: left; */
margin: 0;
}
h4 {
font-size: 12pt;
padding: 0;
margin: 0;
}
.startButton {
width: 100.5%;
background-color: #4CAF50;
color: white;
padding-top: 14px;
padding-bottom: 14px;
margin-top: 4px;
margin-bottom: 4px;
border: none;
border-radius: 4px;
cursor: pointer;
}
.subSection {
width: 100%;
text-align: center;
font-size: 12pt;
color: white;
padding: 0;
background-color: #4d5259;
border-style: solid;
border: solid white;
border-radius: 6px;
padding-bottom: 2px;
padding-top: 2px;
margin-top: 3px;
margin-bottom: 3px;
}
.slider {
-webkit-appearance: none;
width: 98%;
background: none;
outline: none;
margin-top: 10px;
margin-bottom: 10px;
height: 1px;
border: 2px solid #white;
background-color: #fff;
}
.slider::-webkit-slider-thumb {
-webkit-appearance: none;
border: 1px solid #bdc3c7;
width: 20px;
height: 20px;
background: #4CAF50;
border-radius: 3px;
cursor: pointer;
}
.slider::-moz-range-thumb {
border: 1px solid #bdc3c7;
width: 20px;
height: 20px;
background: #4CAF50;
border-radius: 3px;
cursor: pointer;
}
.slider::-moz-range-track {
width: 100%;
height: 5px;
background-color: #fff;
}
span.spacer{
display:inline-block;
width: 1px;
height: 25px;
color: #fff;
background-color: #fff;
border: 1px solid #fff;
border-radius: 6px;
}

11
package-lock.json generated
View file

@ -12,7 +12,6 @@
"express": "^4.18.1",
"sass": "^1.52.3",
"socket.io": "^4.5.0",
"socket.js": "^0.1.4",
"ts-node": "^10.8.1",
"typescript": "^4.7.4"
},
@ -1078,11 +1077,6 @@
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
},
"node_modules/socket.js": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/socket.js/-/socket.js-0.1.4.tgz",
"integrity": "sha512-2JqBbfPOslz48eSRibPa98123V2iR5vxWBQt7w3pSxEgCMOHafNqmjpdZLpwcXe6y6H+Mj0MablR1VXfU4NN2Q=="
},
"node_modules/source-map-js": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
@ -2042,11 +2036,6 @@
}
}
},
"socket.js": {
"version": "0.1.4",
"resolved": "https://registry.npmjs.org/socket.js/-/socket.js-0.1.4.tgz",
"integrity": "sha512-2JqBbfPOslz48eSRibPa98123V2iR5vxWBQt7w3pSxEgCMOHafNqmjpdZLpwcXe6y6H+Mj0MablR1VXfU4NN2Q=="
},
"source-map-js": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",

View file

@ -18,7 +18,6 @@
"express": "^4.18.1",
"sass": "^1.52.3",
"socket.io": "^4.5.0",
"socket.js": "^0.1.4",
"ts-node": "^10.8.1",
"typescript": "^4.7.4"
},

View file

@ -4,7 +4,6 @@ import { port } from "../env.js"
var app = express()
const __dirname = path.resolve(path.dirname(''));
app.use(express.static(path.normalize(__dirname + '/client/www/')));
console.log(path.normalize(__dirname + '/client/www/'))
app.use(express.static(path.normalize(__dirname + '/dist/www/')));
export var webServer = app.listen(port, function () {
});

View file

@ -4,7 +4,7 @@
"module": "es2015",
"target": "es6",
"rootDir": "server/src",
"outDir": "dist",
"outDir": "dist/server",
"sourceMap": true,
"strict": true
},