Skip to content

Commit c6fca69

Browse files
Merge pull request #200 from MarcellPerger1/fix-scripts-directory
Split `scripts` directory into multiple sub-directories
2 parents 462b38c + 6c6e28f commit c6fca69

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+253
-99
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@ jobs:
3030
- run: npm install
3131
- name: Run tests
3232
id: run_tests
33-
run: |
34-
chmod +x ./scripts/test.sh
35-
npm test -- --colors;
33+
run: npm test -- --colors
3634
- name: Check if need to upload diff
3735
if: ${{ always() }}
3836
id: check_output
@@ -73,7 +71,7 @@ jobs:
7371
- name: Run eslint
7472
run: ./node_modules/.bin/eslint --max-warnings 0 ./
7573
- name: Run custom linters
76-
run: node ./scripts/find_bad_import.js
74+
run: node ./scripts/lint/find_bad_import.js
7775

7876
check_formatted:
7977
runs-on: ubuntu-latest
@@ -119,13 +117,11 @@ jobs:
119117
- name: Install npm pacakges
120118
run: npm ci
121119
- name: Build libs
122-
run: |
123-
chmod +x ./scripts/build_libs.sh
124-
./scripts/build_libs.sh
120+
run: npm run build:libs
125121
- name: Build `.ts` files
126-
run: chmod +x ./scripts/build_ts.sh && ./scripts/build_ts.sh
122+
run: npm run build:ts
127123
- name: Generate texture atlas
128-
run: node ./scripts/make_atlas.js
124+
run: npm run build:atlas
129125

130126
- name: Commit texture atlas
131127
uses: stefanzweifel/git-auto-commit-action@v5

.prettierrc.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
trailingComma: es5
2+
experimentalTernaries: true

configs/default.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,11 @@
7676
},
7777
"shader": {
7878
"$class": "ShaderConfig",
79-
"vsPath": "./shaders/vertex-shader.glsl",
80-
"fsPath": "./shaders/fragment-shader.glsl",
79+
"vsPath": "./src/shaders/display/vertex.glsl",
80+
"fsPath": "./src/shaders/display/fragment.glsl",
8181
"picking": {
82-
"vsPath": "./shaders/picking/vertex.glsl",
83-
"fsPath": "./shaders/picking/fragment.glsl"
82+
"vsPath": "./src/shaders/picking/vertex.glsl",
83+
"fsPath": "./src/shaders/picking/fragment.glsl"
8484
}
8585
},
8686
"atlas": {

index.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,10 @@
3232
<link rel="modulepreload" href=src/utils/object_utils.js>
3333
<link rel="prefetch" href="configs/config.json" as="fetch">
3434
<link rel="prefetch" href="configs/default.json" as="fetch">
35-
<link rel="prefetch" href="shaders/fragment-shader.glsl" as="fetch">
36-
<link rel="prefetch" href="shaders/vertex-shader.glsl" as="fetch">
35+
<link rel="prefetch" href="src/shaders/display/fragment.glsl" as="fetch">
36+
<link rel="prefetch" href="src/shaders/display/vertex.glsl" as="fetch">
37+
<link rel="prefetch" href="src/shaders/picking/fragment.glsl" as="fetch">
38+
<link rel="prefetch" href="src/shaders/picking/vertex.glsl" as="fetch">
3739
<link rel="prefetch" href="res/atlas-index.json" as="fetch">
3840
<link rel="prefetch" href="res/atlas.png" as="image">
3941
<!-- <script src="https://benvanik.github.io/WebGL-Inspector/core/embed.js" defer></script> -->

package-lock.json

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

package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"@types/jest-image-snapshot": "^6.2.0",
1212
"canvas": "^2.11.2",
1313
"eslint": "^8.11.0",
14-
"eslint-plugin-custom-rules": "file:scripts/eslint-plugin-custom-rules",
14+
"eslint-plugin-custom-rules": "file:scripts/lint/eslint-plugin-custom-rules",
1515
"eslint-plugin-import": "^2.29.1",
1616
"eslint-plugin-jest": "^28.6.0",
1717
"istanbul-lib-coverage": "^3.2.0",
@@ -27,18 +27,18 @@
2727
"v8-to-istanbul": "^9.1.0"
2828
},
2929
"scripts": {
30-
"test": "chmod +x ./scripts/test.sh && ./scripts/test.sh",
31-
"test:update": "./scripts/update_new_tests.sh",
32-
"test:update:all": "./scripts/update_tests.sh",
33-
"test:update:all+prune": "./scripts/update_tests_prune.sh",
34-
"coverage": "chmod +x ./scripts/coverage.sh && ./scripts/coverage.sh",
35-
"coverage:filtered": "chmod +x ./scripts/coverage-filtered.sh && ./scripts/coverage-filtered.sh",
36-
"lint": "chmod +x ./scripts/linter.sh && ./scripts/linter.sh",
37-
"format": "chmod +x ./scripts/format.sh && ./scripts/format.sh",
38-
"format_check": "chmod +x ./scripts/format_check.sh && ./scripts/format_check.sh",
39-
"build:atlas": "node ./scripts/make_atlas.js",
40-
"build:ts": "./scripts/build_ts.sh",
41-
"build:libs": "./scripts/build_libs.sh",
30+
"test": "./scripts/test/test.sh",
31+
"test:update": "./scripts/test/update_new.sh",
32+
"test:update:all": "./scripts/test/update_all.sh",
33+
"test:update:all+prune": "./scripts/test/update_all_prune.sh",
34+
"coverage": "./scripts/test/cov/coverage.sh",
35+
"coverage:filtered": "./scripts/test/cov/coverage-filtered.sh",
36+
"lint": "./scripts/lint/linter.sh",
37+
"format": "./scripts/format/format.sh",
38+
"format_check": "./scripts/format/format_check.sh",
39+
"build:atlas": "node ./scripts/build/make_atlas.js",
40+
"build:ts": "./scripts/build/build_ts.sh",
41+
"build:libs": "./scripts/build/build_libs.sh",
4242
"build:all": "npm run build:libs && npm run build:ts && npm run build:atlas"
4343
},
4444
"keywords": [

scripts/count_lines.sh

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)