Skip to content

Commit d75aa85

Browse files
authored
Merge pull request #125 from Next2D/develop
Develop
2 parents 281748f + 22d8b6c commit d75aa85

File tree

5 files changed

+12
-10
lines changed

5 files changed

+12
-10
lines changed

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ jobs:
1717
- uses: actions/checkout@v3
1818
- uses: actions/setup-node@v3
1919
- run: npm install
20-
- run: npm run lint
20+
- run: npx eslint ./src/**/*.ts
2121

2222
windows-browser-test:
2323
runs-on: windows-latest
2424
steps:
2525
- uses: actions/checkout@v3
2626
- uses: actions/setup-node@v3
2727
- run: npm install
28-
- run: npm run lint
28+
- run: npx eslint ./src/**/*.ts

.npmignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
.gitattributes
44
.gitignore
55
.github
6-
node_modules
76
__tests__
7+
scripts
88
src
99
Framework_Flowchart.svg
1010
tsconfig.eslint.json

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@next2d/framework",
33
"description": "Next2D Framework is designed according to the principles of clean architecture, domain-driven development, test-driven development, and MVVM, with an emphasis on flexibility, scalability, and maintainability, and a design methodology that keeps each layer loosely coupled.",
4-
"version": "2.0.1",
4+
"version": "2.0.2",
55
"homepage": "https://next2d.app",
66
"bugs": "https://github.com/Next2D/Framework/issues/new",
77
"author": "Toshiyuki Ienaga <[email protected]> (https://github.com/ienaga/)",
@@ -27,8 +27,8 @@
2727
},
2828
"devDependencies": {
2929
"@next2d/player": "*",
30-
"@typescript-eslint/eslint-plugin": "^6.9.1",
31-
"@typescript-eslint/parser": "^6.9.1",
30+
"@typescript-eslint/eslint-plugin": "^6.10.0",
31+
"@typescript-eslint/parser": "^6.10.0",
3232
"eslint": "^8.53.0",
3333
"jsdom": "^22.1.0",
3434
"typescript": "^5.2.2",

src/domain/parser/QueryParser.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,23 +36,24 @@ export const execute = (name: string = ""): QueryObjectImpl =>
3636
}
3737
}
3838

39+
const defaultTop: string = config?.defaultTop || "top";
3940
if (!name) {
4041
const names: string[] = location.pathname.split("/");
4142
names.shift();
4243
name = `${names.join("/")}`;
4344
if (name && config && config.routing) {
4445
const routing: RoutingImpl = config.routing[name];
4546
if (!routing) {
46-
name = "top";
47+
name = defaultTop;
4748
}
4849

4950
if (routing && routing.private) {
50-
name = routing.redirect || "top";
51+
name = routing.redirect || defaultTop;
5152
}
5253
}
5354

5455
if (!name) {
55-
name = "top";
56+
name = defaultTop;
5657
}
5758
}
5859

@@ -75,7 +76,7 @@ export const execute = (name: string = ""): QueryObjectImpl =>
7576
}
7677

7778
if (name.slice(0, 1) === ".") {
78-
name = name.split("/").slice(1).join("/") || "top";
79+
name = name.split("/").slice(1).join("/") || defaultTop;
7980
}
8081

8182
if (name.indexOf("@") > -1) {

src/interface/ConfigImpl.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export interface ConfigImpl extends BaseConfigImpl {
1212
routing?: {
1313
[key: string]: RoutingImpl
1414
};
15+
defaultTop?: string;
1516
spa: boolean;
1617
loading?: {
1718
callback: string;

0 commit comments

Comments
 (0)