isaacscript 3.5.10-dev.4 → 3.5.10-dev.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/file-templates/dynamic/.github/workflows/ci.yml +9 -4
- package/file-templates/dynamic/{README.md → README.mod.md} +2 -2
- package/file-templates/dynamic/README.ts.md +3 -0
- package/file-templates/dynamic/gitignore +2 -0
- package/file-templates/dynamic/mod/metadata.xml +3 -3
- package/file-templates/dynamic/{package.json → package.mod.json} +3 -9
- package/file-templates/dynamic/package.ts.json +30 -0
- package/file-templates/dynamic/src/main.ts +1 -1
- package/file-templates/static/gitattributes +1 -0
- package/file-templates/{static → static-mod}/.eslintrc.template.cjs +1 -1
- package/file-templates/{static → static-mod}/.luarc.json +0 -0
- package/file-templates/{static → static-mod}/.prettierignore +0 -0
- package/file-templates/{static → static-mod}/.prettierrc.cjs +1 -0
- package/file-templates/{static → static-mod}/.vscode/extensions.json +0 -0
- package/file-templates/{static → static-mod}/.vscode/settings.json +1 -0
- package/file-templates/{static → static-mod}/build.sh +0 -0
- package/file-templates/{static → static-mod}/cspell.template.json +10 -1
- package/file-templates/{static → static-mod}/lint.sh +0 -0
- package/file-templates/{static → static-mod}/publish.sh +0 -0
- package/file-templates/{static → static-mod}/run.sh +0 -0
- package/file-templates/{static → static-mod}/tsconfig.json +0 -6
- package/file-templates/static-ts/.eslintrc.template.cjs +24 -0
- package/file-templates/static-ts/.prettierignore +7 -0
- package/file-templates/{static-alt/.prettierrc-base.cjs → static-ts/.prettierrc.cjs} +2 -2
- package/file-templates/{static-alt/.vscode/extensions-typescript.json → static-ts/.vscode/extensions.json} +0 -0
- package/file-templates/{static-alt/.vscode/settings-typescript.json → static-ts/.vscode/settings.json} +42 -0
- package/file-templates/static-ts/build.sh +43 -0
- package/file-templates/static-ts/cspell.template.json +27 -0
- package/file-templates/static-ts/lint.sh +32 -0
- package/file-templates/static-ts/publish.sh +10 -0
- package/file-templates/static-ts/run.sh +39 -0
- package/file-templates/static-ts/src/main.js +4 -0
- package/file-templates/static-ts/src/main.js.map +1 -0
- package/file-templates/static-ts/src/main.ts +3 -0
- package/file-templates/static-ts/tsconfig.json +14 -0
- package/package.json +2 -3
- package/src/commands/init/createProject.js +65 -47
- package/src/commands/init/createProject.js.map +1 -1
- package/src/commands/init/getModsDir.js +4 -1
- package/src/commands/init/getModsDir.js.map +1 -1
- package/src/commands/init/init.js +13 -7
- package/src/commands/init/init.js.map +1 -1
- package/src/commands/publish/publish.js +15 -13
- package/src/commands/publish/publish.js.map +1 -1
- package/src/configFile.js +7 -3
- package/src/configFile.js.map +1 -1
- package/src/constants.js +6 -8
- package/src/constants.js.map +1 -1
- package/src/main.js +7 -3
- package/src/main.js.map +1 -1
- package/src/parseArgs.js +4 -0
- package/src/parseArgs.js.map +1 -1
- package/src/parseArgsNew.js +30 -0
- package/src/parseArgsNew.js.map +1 -0
- package/file-templates/static-alt/.prettierignore-base +0 -2
|
@@ -13,18 +13,18 @@ jobs:
|
|
|
13
13
|
uses: actions/setup-node@v3
|
|
14
14
|
with:
|
|
15
15
|
node-version: lts/*
|
|
16
|
-
cache:
|
|
16
|
+
cache: PACKAGE_MANAGER_NAME
|
|
17
17
|
|
|
18
18
|
- name: Retrieve the cached "node_modules" directory (if present)
|
|
19
19
|
uses: actions/cache@v3
|
|
20
20
|
id: node-cache
|
|
21
21
|
with:
|
|
22
22
|
path: node_modules
|
|
23
|
-
key: node-modules-${{ runner.os }}-${{ hashFiles('
|
|
23
|
+
key: node-modules-${{ runner.os }}-${{ hashFiles('PACKAGE_MANAGER_LOCK_FILE_NAME') }}
|
|
24
24
|
|
|
25
25
|
- name: Install dependencies (if the cached directory was not found)
|
|
26
26
|
if: steps.node-cache.outputs.cache-hit != 'true'
|
|
27
|
-
run:
|
|
27
|
+
run: PACKAGE_MANAGER_INSTALL_COMMAND
|
|
28
28
|
|
|
29
29
|
- name: Test to see if the project compiles
|
|
30
30
|
run: bash build.sh
|
|
@@ -32,6 +32,7 @@ jobs:
|
|
|
32
32
|
- name: Perform automated checks
|
|
33
33
|
run: bash lint.sh
|
|
34
34
|
|
|
35
|
+
# @template-mod-start
|
|
35
36
|
# To enable publishing in CI, follow the instructions here:
|
|
36
37
|
# https://github.com/IsaacScript/isaac-steam-workshop-upload
|
|
37
38
|
# Then, uncomment the lines below.
|
|
@@ -40,6 +41,7 @@ jobs:
|
|
|
40
41
|
# if: "contains(github.event.head_commit.message, 'chore: release') && github.event_name != 'pull_request'"
|
|
41
42
|
# env:
|
|
42
43
|
# CONFIG_VDF_CONTENTS: ${{ secrets.CONFIG_VDF_CONTENTS }}
|
|
44
|
+
# @template-mod-end
|
|
43
45
|
|
|
44
46
|
# To enable CI failure notifications over Discord:
|
|
45
47
|
# - Right click on a channel in Discord and select "Edit Channel".
|
|
@@ -50,7 +52,10 @@ jobs:
|
|
|
50
52
|
# - Change the image to: https://github.com/IsaacScript/isaacscript/raw/main/misc/github.png
|
|
51
53
|
# - Click on the "Save Changes" button at the bottom.
|
|
52
54
|
# - Click on the "Copy Webhook URL" button.
|
|
53
|
-
# - Go to
|
|
55
|
+
# - Go to the main page for your repository on GitHub.
|
|
56
|
+
# - Click on the "Settings" tab near the top.
|
|
57
|
+
# - Click on "Secrets and variables" in the left menu.
|
|
58
|
+
# - Click on "Actions" from the dropdown list.
|
|
54
59
|
# - Click on the "New repository secret" button in the top right.
|
|
55
60
|
# - For the "Name" box, use "DISCORD_WEBHOOK" (without the quotes).
|
|
56
61
|
# - For the "Secret" box, paste in the URL that was copied in the "Copy Webhook URL" step.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# PROJECT-NAME
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
PROJECT-NAME is a mod for _[The Binding of Isaac: Repentance](https://store.steampowered.com/app/1426300/The_Binding_of_Isaac_Repentance/)_, written in [TypeScript](https://www.typescriptlang.org/) using the [IsaacScript](https://isaacscript.github.io/) framework.
|
|
4
4
|
|
|
5
5
|
## How To Play
|
|
6
6
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
2
2
|
<?xml-model href="https://wofsauge.github.io/isaac-xml-validator/xsd/metadata.xsd" ?>
|
|
3
3
|
<metadata>
|
|
4
|
-
<name>
|
|
5
|
-
<directory>
|
|
6
|
-
<description>
|
|
4
|
+
<name>PROJECT_NAME</name>
|
|
5
|
+
<directory>PROJECT_NAME</directory>
|
|
6
|
+
<description>PROJECT_NAME is a currently a work in progress.</description>
|
|
7
7
|
<version>1.0</version>
|
|
8
8
|
<visibility />
|
|
9
9
|
</metadata>
|
|
@@ -1,16 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
"name": "
|
|
2
|
+
"name": "PROJECT_NAME",
|
|
3
3
|
"version": "0.0.0",
|
|
4
4
|
"description": "A mod for The Binding of Isaac: Repentance.",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"isaac",
|
|
7
|
-
"mod",
|
|
8
|
-
"rebirth",
|
|
9
|
-
"afterbirth",
|
|
10
|
-
"repentance"
|
|
11
|
-
],
|
|
5
|
+
"keywords": ["isaac", "mod", "rebirth", "afterbirth", "repentance"],
|
|
12
6
|
"license": "GPL-3.0",
|
|
13
|
-
"author": "AUTHOR-NAME",
|
|
14
7
|
"type": "commonjs",
|
|
15
8
|
"dependencies": {
|
|
16
9
|
"isaac-typescript-definitions": "^0.0.1",
|
|
@@ -18,6 +11,7 @@
|
|
|
18
11
|
"isaacscript-common": "^0.0.1",
|
|
19
12
|
"isaacscript-lint": "^0.0.1",
|
|
20
13
|
"isaacscript-spell": "^0.0.1",
|
|
14
|
+
"isaacscript-tsconfig": "^0.0.1",
|
|
21
15
|
"typescript": "^0.0.1",
|
|
22
16
|
"typescript-to-lua": "^0.0.1"
|
|
23
17
|
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "PROJECT_NAME",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"description": "",
|
|
5
|
+
"keywords": [],
|
|
6
|
+
"homepage": "https://github.com/AUTHOR_NAME/PROJECT_NAME",
|
|
7
|
+
"bugs": {
|
|
8
|
+
"url": "https://github.com/AUTHOR_NAME/PROJECT_NAME/issues"
|
|
9
|
+
},
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/AUTHOR_NAME/PROJECT_NAME.git"
|
|
13
|
+
},
|
|
14
|
+
"license": "GPL-3.0",
|
|
15
|
+
"type": "commonjs",
|
|
16
|
+
"author": "AUTHOR_NAME",
|
|
17
|
+
"files": ["dist", "LICENSE", "package.json", "README.md"],
|
|
18
|
+
"scripts": {
|
|
19
|
+
"build": "rimraf dist && tsc",
|
|
20
|
+
"start": "PACKAGE_MANAGER run build && node dist/main.js"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"@types/node": "^0.0.1",
|
|
24
|
+
"isaacscript": "^0.0.1",
|
|
25
|
+
"isaacscript-lint": "^0.0.1",
|
|
26
|
+
"isaacscript-tsconfig": "^0.0.1",
|
|
27
|
+
"rimraf": "^0.0.1",
|
|
28
|
+
"typescript": "^0.0.1"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
File without changes
|
|
File without changes
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
/** @type {import("prettier").Config} */
|
|
5
5
|
module.exports = {
|
|
6
|
+
// Always print trailing commas:
|
|
6
7
|
// https://prettier.io/docs/en/options.html#trailing-commas
|
|
7
8
|
// The default is "es5" (only having trailing commas where valid in ES5). However, always having
|
|
8
9
|
// trailing commas is objectively better. The Airbnb style guide agrees:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -7,12 +7,6 @@
|
|
|
7
7
|
// https://github.com/IsaacScript/isaacscript/blob/main/packages/isaacscript-tsconfig/tsconfig.mod.json
|
|
8
8
|
"extends": "isaacscript-tsconfig/tsconfig.mod.json",
|
|
9
9
|
|
|
10
|
-
// https://www.typescriptlang.org/docs/handbook/compiler-options.html
|
|
11
|
-
"compilerOptions": {
|
|
12
|
-
// Specifies the root folder within your source files.
|
|
13
|
-
"rootDir": "./src",
|
|
14
|
-
},
|
|
15
|
-
|
|
16
10
|
// A list of the TypeScript files to compile.
|
|
17
11
|
"include": ["./src/**/*.ts"],
|
|
18
12
|
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// This is the configuration file for ESLint, the TypeScript linter:
|
|
2
|
+
// https://eslint.org/docs/latest/use/configure/
|
|
3
|
+
module.exports = {
|
|
4
|
+
extends: [
|
|
5
|
+
// The linter base is the shared IsaacScript config:
|
|
6
|
+
// https://github.com/IsaacScript/isaacscript/blob/main/packages/eslint-config-isaacscript/base.js
|
|
7
|
+
"eslint-config-isaacscript/base",
|
|
8
|
+
],
|
|
9
|
+
|
|
10
|
+
// The ".prettierrc.cjs" file is ignored by default, so we have to un-ignore it. Additionally, we
|
|
11
|
+
// don't bother linting the compiled output.
|
|
12
|
+
ignorePatterns: ["!.prettierrc.cjs", "**/dist/**"],
|
|
13
|
+
|
|
14
|
+
parserOptions: {
|
|
15
|
+
// ESLint needs to know about the project's TypeScript settings in order for TypeScript-specific
|
|
16
|
+
// things to lint correctly. We do not point this at "./tsconfig.json" because certain files
|
|
17
|
+
// (such at this file) should be linted but not included in the actual project output.
|
|
18
|
+
project: "./tsconfig.eslint.json",
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
rules: {
|
|
22
|
+
// Insert changed or disabled rules here, if necessary.
|
|
23
|
+
},
|
|
24
|
+
};
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
module.exports = {
|
|
6
6
|
// Always print trailing commas:
|
|
7
7
|
// https://prettier.io/docs/en/options.html#trailing-commas
|
|
8
|
-
// The default is "es5"
|
|
9
|
-
//
|
|
8
|
+
// The default is "es5" (only having trailing commas where valid in ES5). However, always having
|
|
9
|
+
// trailing commas is objectively better. The Airbnb style guide agrees:
|
|
10
10
|
// https://github.com/airbnb/javascript#commas--dangling
|
|
11
11
|
// Prettier itself also acknowledges Nik Graf's blog in their official blog:
|
|
12
12
|
// https://prettier.io/blog/2020/03/21/2.0.0.html
|
|
File without changes
|
|
@@ -8,6 +8,10 @@
|
|
|
8
8
|
"editor.rulers": [100],
|
|
9
9
|
"editor.tabSize": 2,
|
|
10
10
|
|
|
11
|
+
"files.associations": {
|
|
12
|
+
".env*": "shellscript", // e.g. ".env.example" is the same as ".env".
|
|
13
|
+
},
|
|
14
|
+
|
|
11
15
|
// We want to always use "lf" to be consistent with all platforms.
|
|
12
16
|
"files.eol": "\n",
|
|
13
17
|
|
|
@@ -16,6 +20,9 @@
|
|
|
16
20
|
|
|
17
21
|
// Configure glob patterns for excluding files and folders in full text searches and quick open.
|
|
18
22
|
"search.exclude": {
|
|
23
|
+
"**/*.mp3": true,
|
|
24
|
+
"**/*.png": true,
|
|
25
|
+
"**/*.wav": true,
|
|
19
26
|
"**/dist/": true,
|
|
20
27
|
"**/node_modules/": true,
|
|
21
28
|
},
|
|
@@ -35,6 +42,10 @@
|
|
|
35
42
|
"javascript.suggest.completeFunctionCalls": true,
|
|
36
43
|
"typescript.suggest.completeFunctionCalls": true,
|
|
37
44
|
|
|
45
|
+
// By default, VSCode will prefer non-relative paths for deeply nested files.
|
|
46
|
+
"javascript.preferences.importModuleSpecifier": "relative",
|
|
47
|
+
"typescript.preferences.importModuleSpecifier": "relative",
|
|
48
|
+
|
|
38
49
|
// Automatically run the formatter when certain files are saved.
|
|
39
50
|
"[javascript]": {
|
|
40
51
|
"editor.codeActionsOnSave": ["source.fixAll.eslint"],
|
|
@@ -48,6 +59,18 @@
|
|
|
48
59
|
"editor.formatOnSave": true,
|
|
49
60
|
"editor.tabSize": 2,
|
|
50
61
|
},
|
|
62
|
+
"[javascriptreact]": {
|
|
63
|
+
"editor.codeActionsOnSave": ["source.fixAll.eslint"],
|
|
64
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
65
|
+
"editor.formatOnSave": true,
|
|
66
|
+
"editor.tabSize": 2,
|
|
67
|
+
},
|
|
68
|
+
"[typescriptreact]": {
|
|
69
|
+
"editor.codeActionsOnSave": ["source.fixAll.eslint"],
|
|
70
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
71
|
+
"editor.formatOnSave": true,
|
|
72
|
+
"editor.tabSize": 2,
|
|
73
|
+
},
|
|
51
74
|
"[json]": {
|
|
52
75
|
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
53
76
|
"editor.formatOnSave": true,
|
|
@@ -68,4 +91,23 @@
|
|
|
68
91
|
"editor.formatOnSave": true,
|
|
69
92
|
"editor.tabSize": 2,
|
|
70
93
|
},
|
|
94
|
+
"[html]": {
|
|
95
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
96
|
+
"editor.formatOnSave": true,
|
|
97
|
+
"editor.tabSize": 2,
|
|
98
|
+
},
|
|
99
|
+
"[css]": {
|
|
100
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
101
|
+
"editor.formatOnSave": true,
|
|
102
|
+
"editor.tabSize": 2,
|
|
103
|
+
},
|
|
104
|
+
"[postcss]": {
|
|
105
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
106
|
+
"editor.formatOnSave": true,
|
|
107
|
+
"editor.tabSize": 2,
|
|
108
|
+
},
|
|
109
|
+
"[prisma]": {
|
|
110
|
+
"editor.formatOnSave": true,
|
|
111
|
+
"editor.tabSize": 2,
|
|
112
|
+
},
|
|
71
113
|
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
set -e # Exit on any errors
|
|
4
|
+
|
|
5
|
+
# Get the directory of this script:
|
|
6
|
+
# https://stackoverflow.com/questions/59895/getting-the-source-directory-of-a-bash-script-from-within
|
|
7
|
+
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
|
8
|
+
|
|
9
|
+
SECONDS=0
|
|
10
|
+
|
|
11
|
+
NPM_LOCK="$DIR/package-lock.json"
|
|
12
|
+
if test -f "$NPM_LOCK"; then
|
|
13
|
+
NPM_LOCK_EXISTS=1
|
|
14
|
+
fi
|
|
15
|
+
|
|
16
|
+
YARN_LOCK="$DIR/yarn.lock"
|
|
17
|
+
if test -f "$YARN_LOCK"; then
|
|
18
|
+
YARN_LOCK_EXISTS=1
|
|
19
|
+
fi
|
|
20
|
+
|
|
21
|
+
PNPM_LOCK="$DIR/pnpm-lock.yaml"
|
|
22
|
+
if test -f "$PNPM_LOCK"; then
|
|
23
|
+
PNPM_LOCK_EXISTS=1
|
|
24
|
+
fi
|
|
25
|
+
|
|
26
|
+
if [[ -z "$NPM_LOCK_EXISTS" && -z "$YARN_LOCK_EXISTS" && -z "$PNPM_LOCK_EXISTS" ]]; then
|
|
27
|
+
echo "No package manager lock files were found. You should manually invoke the package manager that you want to use for this project. e.g. \"npm install\""
|
|
28
|
+
exit 1
|
|
29
|
+
elif [[ ! -z "$NPM_LOCK_EXISTS" && -z "$YARN_LOCK_EXISTS" && -z "$PNPM_LOCK_EXISTS" ]]; then
|
|
30
|
+
PACKAGE_MANAGER="npm"
|
|
31
|
+
elif [[ -z "$NPM_LOCK_EXISTS" && ! -z "$YARN_LOCK_EXISTS" && -z "$PNPM_LOCK_EXISTS" ]]; then
|
|
32
|
+
PACKAGE_MANAGER="yarn"
|
|
33
|
+
elif [[ -z "$NPM_LOCK_EXISTS" && -z "$YARN_LOCK_EXISTS" && ! -z "$PNPM_LOCK_EXISTS" ]]; then
|
|
34
|
+
PACKAGE_MANAGER="pnpm"
|
|
35
|
+
else
|
|
36
|
+
echo "Error: Multiple different kinds of package manager lock files were found. You should manually invoke the package manager that you want to use for this project. e.g. \"npm install\""
|
|
37
|
+
exit 1
|
|
38
|
+
fi
|
|
39
|
+
|
|
40
|
+
cd "$DIR"
|
|
41
|
+
"$PACKAGE_MANAGER" run build
|
|
42
|
+
|
|
43
|
+
echo "Successfully built in $SECONDS seconds."
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
|
|
3
|
+
"version": "0.2",
|
|
4
|
+
"files": ["**"],
|
|
5
|
+
"enableFiletypes": ["*"],
|
|
6
|
+
"enableGlobDot": true,
|
|
7
|
+
"useGitignore": true,
|
|
8
|
+
"ignorePaths": [
|
|
9
|
+
"*.pyc",
|
|
10
|
+
".git/**",
|
|
11
|
+
"dist/**",
|
|
12
|
+
"node_modules/**",
|
|
13
|
+
"package-lock.json",
|
|
14
|
+
"pnpm-lock.yaml",
|
|
15
|
+
"yarn.lock"
|
|
16
|
+
],
|
|
17
|
+
"words": [
|
|
18
|
+
"autocrlf",
|
|
19
|
+
"dbaeumer",
|
|
20
|
+
"esbenp",
|
|
21
|
+
"isaacscript",
|
|
22
|
+
"pnpm",
|
|
23
|
+
"sarisia",
|
|
24
|
+
"technote",
|
|
25
|
+
"Zamiell"
|
|
26
|
+
]
|
|
27
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
set -e # Exit on any errors
|
|
4
|
+
|
|
5
|
+
# Get the directory of this script:
|
|
6
|
+
# https://stackoverflow.com/questions/59895/getting-the-source-directory-of-a-bash-script-from-within
|
|
7
|
+
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
|
8
|
+
|
|
9
|
+
SECONDS=0
|
|
10
|
+
|
|
11
|
+
cd "$DIR"
|
|
12
|
+
|
|
13
|
+
# Use Prettier to check formatting.
|
|
14
|
+
# "--loglevel warn" makes it only output errors.
|
|
15
|
+
npx prettier --loglevel warn --check .
|
|
16
|
+
|
|
17
|
+
# Use ESLint to lint the TypeScript.
|
|
18
|
+
# "--max-warnings 0" makes warnings fail in CI, since we set all ESLint errors to warnings.
|
|
19
|
+
npx eslint --max-warnings 0 .
|
|
20
|
+
|
|
21
|
+
# Check for unused exports.
|
|
22
|
+
# "--error" makes it return an error code of 1 if unused exports are found.
|
|
23
|
+
npx ts-prune --error
|
|
24
|
+
|
|
25
|
+
# Spell check every file using CSpell.
|
|
26
|
+
# "--no-progress" and "--no-summary" make it only output errors.
|
|
27
|
+
npx cspell --no-progress --no-summary .
|
|
28
|
+
|
|
29
|
+
# Check for orphaned words.
|
|
30
|
+
bash "$DIR/check-orphaned-words.sh"
|
|
31
|
+
|
|
32
|
+
echo "Successfully linted in $SECONDS seconds."
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
set -e # Exit on any errors
|
|
4
|
+
|
|
5
|
+
# Get the directory of this script:
|
|
6
|
+
# https://stackoverflow.com/questions/59895/getting-the-source-directory-of-a-bash-script-from-within
|
|
7
|
+
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
|
8
|
+
|
|
9
|
+
cd "$DIR"
|
|
10
|
+
npx isaacscript publish --ts "$@"
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
set -e # Exit on any errors
|
|
4
|
+
|
|
5
|
+
# Get the directory of this script:
|
|
6
|
+
# https://stackoverflow.com/questions/59895/getting-the-source-directory-of-a-bash-script-from-within
|
|
7
|
+
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
|
8
|
+
|
|
9
|
+
NPM_LOCK="$DIR/package-lock.json"
|
|
10
|
+
if test -f "$NPM_LOCK"; then
|
|
11
|
+
NPM_LOCK_EXISTS=1
|
|
12
|
+
fi
|
|
13
|
+
|
|
14
|
+
YARN_LOCK="$DIR/yarn.lock"
|
|
15
|
+
if test -f "$YARN_LOCK"; then
|
|
16
|
+
YARN_LOCK_EXISTS=1
|
|
17
|
+
fi
|
|
18
|
+
|
|
19
|
+
PNPM_LOCK="$DIR/pnpm-lock.yaml"
|
|
20
|
+
if test -f "$PNPM_LOCK"; then
|
|
21
|
+
PNPM_LOCK_EXISTS=1
|
|
22
|
+
fi
|
|
23
|
+
|
|
24
|
+
if [[ -z "$NPM_LOCK_EXISTS" && -z "$YARN_LOCK_EXISTS" && -z "$PNPM_LOCK_EXISTS" ]]; then
|
|
25
|
+
echo "No package manager lock files were found. You should manually invoke the package manager that you want to use for this project. e.g. \"npm install\""
|
|
26
|
+
exit 1
|
|
27
|
+
elif [[ ! -z "$NPM_LOCK_EXISTS" && -z "$YARN_LOCK_EXISTS" && -z "$PNPM_LOCK_EXISTS" ]]; then
|
|
28
|
+
PACKAGE_MANAGER="npm"
|
|
29
|
+
elif [[ -z "$NPM_LOCK_EXISTS" && ! -z "$YARN_LOCK_EXISTS" && -z "$PNPM_LOCK_EXISTS" ]]; then
|
|
30
|
+
PACKAGE_MANAGER="yarn"
|
|
31
|
+
elif [[ -z "$NPM_LOCK_EXISTS" && -z "$YARN_LOCK_EXISTS" && ! -z "$PNPM_LOCK_EXISTS" ]]; then
|
|
32
|
+
PACKAGE_MANAGER="pnpm"
|
|
33
|
+
else
|
|
34
|
+
echo "Error: Multiple different kinds of package manager lock files were found. You should manually invoke the package manager that you want to use for this project. e.g. \"npm install\""
|
|
35
|
+
exit 1
|
|
36
|
+
fi
|
|
37
|
+
|
|
38
|
+
cd "$DIR"
|
|
39
|
+
"$PACKAGE_MANAGER" run start
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../../../../../packages/isaacscript-cli/file-templates/static-ts/src/main.ts"],"names":[],"mappings":";AAAA,IAAI,EAAE,CAAC;AAEP,SAAS,IAAI,KAAI,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// The configuration file for TypeScript.
|
|
2
|
+
{
|
|
3
|
+
// We extend the standard IsaacScript config:
|
|
4
|
+
// https://github.com/IsaacScript/isaacscript/blob/main/packages/isaacscript-tsconfig/tsconfig.node.json
|
|
5
|
+
"extends": "isaacscript-tsconfig/tsconfig.node.json",
|
|
6
|
+
|
|
7
|
+
// https://www.typescriptlang.org/docs/handbook/compiler-options.html
|
|
8
|
+
"compilerOptions": {
|
|
9
|
+
"outDir": "./dist",
|
|
10
|
+
},
|
|
11
|
+
|
|
12
|
+
// A list of the TypeScript files to compile.
|
|
13
|
+
"include": ["./src/**/*.ts"],
|
|
14
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "isaacscript",
|
|
3
|
-
"version": "3.5.10-dev.
|
|
3
|
+
"version": "3.5.10-dev.6",
|
|
4
4
|
"description": "A command line tool for managing Isaac mods written in TypeScript.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"isaac",
|
|
@@ -32,8 +32,7 @@
|
|
|
32
32
|
"figlet": "^1.5.2",
|
|
33
33
|
"git-dirty": "^1.0.2",
|
|
34
34
|
"glob": "^8.1.0",
|
|
35
|
-
"isaacscript-common-ts": "^7.0.
|
|
36
|
-
"isaacscript-tsconfig": "^3.0.4",
|
|
35
|
+
"isaacscript-common-ts": "^7.0.6",
|
|
37
36
|
"jsonc-parser": "^3.2.0",
|
|
38
37
|
"klaw-sync": "^6.0.0",
|
|
39
38
|
"moment": "^2.29.4",
|