Skip to content

Commit 19316ca

Browse files
committed
run lint and add test scripts
1 parent 1c9bfb4 commit 19316ca

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

packages/@apphosting/build/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@
2121
"type": "module",
2222
"sideEffects": false,
2323
"scripts": {
24-
"build": "rm -rf dist && tsc && chmod +x ./dist/bin/*"
24+
"build": "rm -rf dist && tsc && chmod +x ./dist/bin/*",
25+
"test": "npm run test:unit && npm run test:functional",
26+
"test:unit": "ts-mocha -p tsconfig.json 'src/**/*.spec.ts' 'src/*.spec.ts'",
27+
"test:functional": "node --loader ts-node/esm ./e2e/run-local.ts"
2528
},
2629
"exports": {
2730
".": {

packages/@apphosting/build/src/bin/localbuild.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
11
#! /usr/bin/env node
22
import { spawn } from "child_process";
33
import { program } from "commander";
4-
import { parse as semverParse } from "semver";
54
import { yellow, bgRed, bold } from "colorette";
6-
// @ts-expect-error TODO add interface
7-
import pickManifest from "npm-pick-manifest";
8-
import { discover } from "@apphosting/discover";
95

106
program
117
// TODO: add framework option later. For now we support nextjs only.
128
.argument("<directory>", "path to the project's root directory")
139
.action(async () => {
14-
1510
const projectRoot = program.args[0];
1611
const framework = "nextjs";
1712
// TODO: We are using the latest framework adapter versions, but in the future

packages/@apphosting/build/tsconfig.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,8 @@
77
"include": [
88
"src/index.ts",
99
"src/bin/*.ts",
10-
]
10+
],
11+
"exclude": [
12+
"src/*.spec.ts"
13+
]
1114
}

0 commit comments

Comments
 (0)