Skip to content

Commit 9c005ee

Browse files
authored
Merge pull request #38 from Next2D/develop
Framework v3の受け入れ
2 parents c17568b + 2fb821b commit 9c005ee

Some content is hidden

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

48 files changed

+576
-498
lines changed

.gitattributes

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
*.js text eol=lf
1+
*.js text eol=lf
2+
*.ts text eol=lf

.github/workflows/codeql-analysis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ jobs:
4040

4141
steps:
4242
- name: Checkout repository
43-
uses: actions/checkout@v3
43+
uses: actions/checkout@v4
4444

4545
# Initializes the CodeQL tools for scanning.
4646
- name: Initialize CodeQL
47-
uses: github/codeql-action/init@v2
47+
uses: github/codeql-action/init@v3
4848
with:
4949
languages: ${{ matrix.language }}
5050
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -55,7 +55,7 @@ jobs:
5555
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
5656
# If this step fails, then you should remove it and run the build manually (see below)
5757
- name: Autobuild
58-
uses: github/codeql-action/autobuild@v2
58+
uses: github/codeql-action/autobuild@v3
5959

6060
# ℹ️ Command-line programs to run using the OS shell.
6161
# 📚 https://git.io/JvXDl
@@ -69,4 +69,4 @@ jobs:
6969
# make release
7070

7171
- name: Perform CodeQL Analysis
72-
uses: github/codeql-action/analyze@v2
72+
uses: github/codeql-action/analyze@v3

.github/workflows/lint.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ jobs:
1414
macos-browser-test:
1515
runs-on: macos-latest
1616
steps:
17-
- uses: actions/checkout@v3
18-
- uses: actions/setup-node@v3
17+
- uses: actions/checkout@v4
18+
- uses: actions/setup-node@v4
1919
- run: |
2020
npm install
2121
npx eslint ./src/**/*.ts
@@ -24,8 +24,8 @@ jobs:
2424
windows-browser-test:
2525
runs-on: windows-latest
2626
steps:
27-
- uses: actions/checkout@v3
28-
- uses: actions/setup-node@v3
27+
- uses: actions/checkout@v4
28+
- uses: actions/setup-node@v4
2929
- run: |
3030
npm install
3131
npx eslint ./src/**/*.ts

.github/workflows/publish.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@ name: Publish Package
33
on:
44
push:
55
branches:
6-
- publish
6+
- main
77

88
jobs:
99
build:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@v3
13-
- uses: actions/setup-node@v3
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-node@v4
1414
with:
15+
node-version: "22.x"
1516
registry-url: "https://registry.npmjs.org"
1617
- run: npm publish --access public
1718
env:

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@next2d/framework-typescript-template",
33
"description": "Next2D Framework default TypeScript template.",
4-
"version": "2.0.9",
4+
"version": "2.1.0",
55
"homepage": "https://next2d.app",
66
"bugs": "https://github.com/Next2D/framework-typescript-template/issues/new",
77
"author": "Toshiyuki Ienaga<[email protected]>",

template.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
{
22
"package": {
3-
"dependencies": {
3+
"devDependencies": {
44
"@typescript-eslint/eslint-plugin": "*",
55
"@typescript-eslint/parser": "*",
6+
"@eslint/eslintrc": "*",
7+
"@eslint/js": "*",
68
"typescript": "*",
7-
"eslint": "*"
9+
"eslint": "*",
10+
"eslint-plugin-unused-imports": "*"
811
}
912
}
1013
}

template/.eslintignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

template/.eslintrc.json

Lines changed: 0 additions & 88 deletions
This file was deleted.

template/.gitattributes

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
*.js text eol=lf
1+
*.js text eol=lf
2+
*.ts text eol=lf

template/@types/window.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Next2D } from "@next2d/core";
1+
import type { Next2D } from "@next2d/core";
22

33
declare global {
44

template/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ Generate the necessary View and ViewModel classes from the routing JSON file.
3333

3434
Launches the test runner.
3535

36+
## Build
37+
3638
### `npm run build:web`
3739
### `npm run build:steam:windows`
3840
### `npm run build:steam:macos`

template/electron/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
}
1313
},
1414
"devDependencies": {
15-
"electron": "^27.0.4"
15+
"electron": "*"
1616
}
1717
}

template/eslint.config.mjs

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
import unusedImports from "eslint-plugin-unused-imports";
2+
import globals from "globals";
3+
import tsParser from "@typescript-eslint/parser";
4+
import path from "node:path";
5+
import { fileURLToPath } from "node:url";
6+
import js from "@eslint/js";
7+
import { FlatCompat } from "@eslint/eslintrc";
8+
9+
const __filename = fileURLToPath(import.meta.url);
10+
const __dirname = path.dirname(__filename);
11+
const compat = new FlatCompat({
12+
"baseDirectory": __dirname,
13+
"recommendedConfig": js.configs.recommended,
14+
"allConfig": js.configs.all
15+
});
16+
17+
export default [{
18+
"ignores": [
19+
"**/node_modules/*",
20+
"**/dist",
21+
"**/build",
22+
"**/json",
23+
"**/@types",
24+
"**/.github",
25+
"**/*.test.ts"
26+
],
27+
}, ...compat.extends("plugin:@typescript-eslint/eslint-recommended"), {
28+
"plugins": {
29+
"unused-imports": unusedImports
30+
},
31+
32+
"languageOptions": {
33+
"globals": {
34+
...globals.browser
35+
},
36+
37+
"parser": tsParser,
38+
"ecmaVersion": "latest",
39+
"sourceType": "module"
40+
},
41+
42+
"rules": {
43+
"no-unused-vars": "off",
44+
"unused-imports/no-unused-imports": "error",
45+
46+
"unused-imports/no-unused-vars": ["warn", {
47+
"vars": "all",
48+
"varsIgnorePattern": "^_",
49+
"args": "after-used",
50+
"argsIgnorePattern": "^_"
51+
}],
52+
53+
"no-var": "error",
54+
55+
"semi": ["error", "always", {
56+
"omitLastInOneLineBlock": true
57+
}],
58+
59+
"block-spacing": "error",
60+
61+
"indent": ["error", 4, {
62+
"SwitchCase": 1
63+
}],
64+
65+
"no-mixed-spaces-and-tabs": "error",
66+
67+
"no-multiple-empty-lines": ["error", {
68+
"max": 1
69+
}],
70+
71+
"no-trailing-spaces": "error",
72+
"space-infix-ops": "error",
73+
"dot-notation": "error",
74+
"eqeqeq": "error",
75+
"quotes": ["error", "double"],
76+
"no-else-return": "error",
77+
"no-loop-func": "error",
78+
"arrow-parens": "error",
79+
"arrow-spacing": "error",
80+
"no-undef": "off",
81+
"comma-dangle": "warn",
82+
"no-use-before-define": "off",
83+
"no-const-assign": "error",
84+
"space-before-blocks": "error",
85+
"no-unexpected-multiline": "error",
86+
"object-curly-spacing": ["error", "always"],
87+
"quote-props": ["error", "always"],
88+
89+
"max-len": ["error", {
90+
"code": 200,
91+
"ignoreStrings": true,
92+
"ignoreComments": true,
93+
"ignoreTemplateLiterals": true
94+
}],
95+
96+
"no-debugger": "error",
97+
"no-dupe-keys": "error",
98+
"no-duplicate-case": "error",
99+
"no-empty": "error",
100+
"no-extra-parens": "error",
101+
"no-func-assign": "error",
102+
"no-irregular-whitespace": "error",
103+
"no-sparse-arrays": "error",
104+
"no-unreachable": "error",
105+
"no-unsafe-negation": "error",
106+
"use-isnan": "error",
107+
"block-scoped-var": "error",
108+
"no-caller": "error",
109+
"curly": "error",
110+
"no-case-declarations": "error",
111+
"no-floating-decimal": "error",
112+
"no-eq-null": "error",
113+
"no-empty-function": "error",
114+
"no-empty-pattern": "error",
115+
"no-extend-native": "error",
116+
"dot-location": ["error", "property"],
117+
"no-global-assign": "error",
118+
"no-implicit-globals": "error",
119+
"no-invalid-this": "error",
120+
"no-lone-blocks": "error",
121+
"no-iterator": "error",
122+
"no-new": "error",
123+
"no-proto": "error",
124+
"no-return-assign": "error",
125+
"no-self-assign": "error",
126+
"no-self-compare": "error",
127+
"no-useless-concat": "error",
128+
"no-useless-call": "error",
129+
"no-useless-return": "error",
130+
"no-unused-expressions": "error",
131+
"no-class-assign": "error",
132+
"no-sequences": "error",
133+
"no-dupe-args": "error",
134+
"no-extra-boolean-cast": "error",
135+
"no-obj-calls": "error",
136+
"no-console": "off",
137+
"no-extra-semi": "warn"
138+
}
139+
}];

template/file/README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
# NoCode Tool n2d Files
1+
# Animation Tool n2d Files
22

3-
NoCode Toolで作成したn2dファイルを格納してます。
4-
NoCode Toolで作成されたn2dファイルはバージョン管理が可能なので、プロジェクト単位のリポジトリで管理する事も可能です。
3+
Animation Toolで作成したn2dファイルを格納してます。Animation Toolで作成された `.n2d` ファイルはバージョン管理が可能なので、プロジェクト単位のリポジトリで管理する事も可能です。
54

6-
It stores n2d files created by the NoCode Tool.
7-
Since n2d files created by the NoCode Tool can be versioned, they can be managed in a per-project repository.
5+
It stores n2d files created by the Animation Tool. Since `.n2d` files created by the Animation Tool can be versioned, they can be managed in a per-project repository.

template/mock/README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
# Mock
22

3-
ローカル開発時のモックディレクトリ環境です。
4-
`http://localhost:8080/***` としてアクセス可能です。
5-
routing.jsonのパス設定と重複しないよう気をつけて運用してください。
3+
ローカル環境での開発時に利用できるモックディレクトリです。`http://localhost:5173/***` としてアクセス可能ですが、 `routing.json` のパス設定と重複しないよう気をつけて運用してください。
64

7-
Mock directory environment for local development.
8-
It can be accessed as `http://localhost:8080/***`.
9-
Please be careful not to duplicate the path setting in routing.json.
5+
This is a mock directory for use during local development. It can be accessed at `http://localhost:5173/***`, but please ensure that it does not conflict with the path settings in `routing.json`.

0 commit comments

Comments
 (0)