Skip to content

Commit de26d8a

Browse files
author
Robert Long
committed
Move from node-sass to sass and upgrade webpack
1 parent e118537 commit de26d8a

File tree

7 files changed

+9857
-9274
lines changed

7 files changed

+9857
-9274
lines changed

admin/package-lock.json

Lines changed: 9032 additions & 8243 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

admin/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,16 @@
5656
"html-webpack-plugin": "^3.1.0",
5757
"htmlhint": "^0.11.0",
5858
"mini-css-extract-plugin": "^0.8.0",
59-
"node-sass": "^4.12.0",
6059
"prettier": "^1.7.0",
6160
"raw-loader": "^0.5.1",
6261
"rimraf": "^2.6.2",
63-
"sass-loader": "^6.0.7",
62+
"sass": "^1.26.10",
63+
"sass-loader": "^9.0.2",
6464
"selfsigned": "^1.10.2",
6565
"shelljs": "^0.8.1",
6666
"style-loader": "^0.20.2",
6767
"url-loader": "^1.0.1",
68-
"webpack": "^4.32.2",
68+
"webpack": "^4.43.0",
6969
"webpack-cli": "^3.2.3",
7070
"webpack-dev-server": "^3.1.14",
7171
"worker-loader": "^2.0.0"

habitat/plan.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ do_build() {
2222

2323
# main client
2424
npm ci --verbose --no-progress
25-
npm rebuild node-sass # HACK sometimes node-sass build fails
26-
npm rebuild node-sass # HACK sometimes node-sass build fails
27-
npm rebuild node-sass # HACK sometimes node-sass build fails
2825

2926
# We inject a random token into the build for the base assets path
3027
export BASE_ASSETS_PATH="$(echo "base_assets_path" | sha256sum | cut -d' ' -f1)/" # HACK need a trailing slash so webpack'ed semantics line up
@@ -35,9 +32,6 @@ do_build() {
3532
# admin
3633
cd admin
3734
npm ci --verbose --no-progress
38-
npm rebuild node-sass # HACK sometimes node-sass build fails
39-
npm rebuild node-sass # HACK sometimes node-sass build fails
40-
npm rebuild node-sass # HACK sometimes node-sass build fails
4135

4236
npm run build
4337
cp -R dist/* ../dist # it will get packaged with the rest of the stuff, below

package-lock.json

Lines changed: 811 additions & 1011 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,15 +147,15 @@
147147
"mini-css-extract-plugin": "^0.8.0",
148148
"ncp": "^2.0.0",
149149
"node-fetch": "^2.6.0",
150-
"node-sass": "^4.13.0",
151150
"ora": "^4.0.2",
152151
"phoenix-channels": "^1.0.0",
153152
"prettier": "^1.7.0",
154153
"protoo-client": "^4.0.4",
155154
"raw-loader": "^0.5.1",
156155
"request": "^2.88.2",
157156
"rimraf": "^2.6.2",
158-
"sass-loader": "^6.0.7",
157+
"sass": "^1.26.10",
158+
"sass-loader": "^9.0.2",
159159
"selfsigned": "^1.10.2",
160160
"shelljs": "^0.8.1",
161161
"spritesheet-js": "github:mozillareality/spritesheet.js#hubs/master",
@@ -166,7 +166,7 @@
166166
"svg-inline-loader": "^0.8.0",
167167
"tar": "^5.0.5",
168168
"url-loader": "^1.0.1",
169-
"webpack": "^4.32.2",
169+
"webpack": "^4.43.0",
170170
"webpack-bundle-analyzer": "^3.3.2",
171171
"webpack-cli": "^3.2.3",
172172
"webpack-dev-server": "^3.1.14",

src/components/virtual-gamepad-controls.css

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,10 @@
4747
border-top-right-radius: 50%;
4848
border-bottom-right-radius: 50%;
4949
border-bottom-left-radius: 50%;
50-
&__hidden {
51-
background-color: transparent;
52-
}
50+
}
51+
52+
:local(.hidden) {
53+
background-color: transparent;
5354
}
5455

5556
:local(.mockJoystick.inner) {

src/components/virtual-gamepad-controls.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import nipplejs from "nipplejs";
22
import styles from "./virtual-gamepad-controls.css";
3-
const HIDDEN_JOYSTICK_STYLE = `${styles.mockJoystick}__hidden`;
43

54
/**
65
* Instantiates 2D virtual gamepads and emits associated events.
@@ -44,14 +43,14 @@ AFRAME.registerComponent("virtual-gamepad-controls", {
4443
if (this.enableLeft) {
4544
this.createLeftStick();
4645
} else {
47-
this.leftMock.classList.add(HIDDEN_JOYSTICK_STYLE);
48-
this.leftMockSmall.classList.add(HIDDEN_JOYSTICK_STYLE);
46+
this.leftMock.classList.add(styles.hidden);
47+
this.leftMockSmall.classList.add(styles.hidden);
4948
}
5049
if (this.enableRight) {
5150
this.createRightStick();
5251
} else {
53-
this.rightMock.classList.add(HIDDEN_JOYSTICK_STYLE);
54-
this.rightMockSmall.classList.add(HIDDEN_JOYSTICK_STYLE);
52+
this.rightMock.classList.add(styles.hidden);
53+
this.rightMockSmall.classList.add(styles.hidden);
5554
}
5655
this.onPreferenceChange = this.onPreferenceChange.bind(this);
5756
window.APP.store.addEventListener("statechanged", this.onPreferenceChange);

0 commit comments

Comments
 (0)