Skip to content

Commit 54ad99e

Browse files
authored
fix!: mv dist/ and testTmp/ to .scaffold/, cache test lib, drop config.test.port (#71)
* fix: move testPluginDir out build, use user's mocha.js, cache chai.js * fix!: mv paths of `dist` and `test` to `.scaffold`, ensure gitignore * chore: clean code
1 parent b3a4036 commit 54ad99e

File tree

5 files changed

+390
-339
lines changed

5 files changed

+390
-339
lines changed

src/cli.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import process, { env, exit } from "node:process";
44
import { Command } from "@commander-js/extra-typings";
55
import pkg from "../package.json" with { type: "json" };
66
import { Build, Config, Release, Serve, Test } from "./index.js";
7+
import { checkGitIgnore } from "./utils/gitignore.js";
78
import { logger } from "./utils/log.js";
89
import { updateNotifier } from "./utils/updater.js";
910

@@ -104,7 +105,11 @@ export default async function main() {
104105
// globalOpts = cli.optsWithGlobals();
105106
}
106107

107-
main().catch(onError);
108+
main()
109+
.then(() => {
110+
checkGitIgnore();
111+
})
112+
.catch(onError);
108113

109114
process.on("uncaughtException", onError);
110115

src/config.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,16 +83,14 @@ function resolveConfig(config: Config): Context {
8383

8484
const defaultConfig = {
8585
source: "src",
86-
dist: "build",
86+
dist: ".scaffold/build",
8787

8888
name: "",
8989
id: "",
9090
namespace: "",
9191
xpiName: "",
92-
xpiDownloadLink:
93-
"https://github.com/{{owner}}/{{repo}}/releases/download/v{{version}}/{{xpiName}}.xpi",
94-
updateURL:
95-
"https://github.com/{{owner}}/{{repo}}/releases/download/release/{{updateJson}}",
92+
xpiDownloadLink: "https://github.com/{{owner}}/{{repo}}/releases/download/v{{version}}/{{xpiName}}.xpi",
93+
updateURL: "https://github.com/{{owner}}/{{repo}}/releases/download/release/{{updateJson}}",
9694

9795
build: {
9896
assets: "addon/**/*.*",
@@ -181,12 +179,12 @@ const defaultConfig = {
181179
mocha: {
182180
timeout: 10000,
183181
},
184-
port: 9876,
185182
abortOnFail: false,
186183
exitOnFinish: false,
187184
headless: false,
188185
startupDelay: 1000,
189186
waitForPlugin: "() => true",
187+
watch: false,
190188
hooks: {},
191189
},
192190
logLevel: "info",

0 commit comments

Comments
 (0)