Skip to content
This repository was archived by the owner on Jan 28, 2025. It is now read-only.

Commit 1c2c0dc

Browse files
chore: remove superfluous component files
1 parent 2e121f8 commit 1c2c0dc

File tree

2 files changed

+0
-43
lines changed

2 files changed

+0
-43
lines changed

packages/serverless-component/lib/getAllFiles.js

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

packages/serverless-component/serverless.js

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ const { Builder } = require("@sls-next/lambda-at-edge");
55

66
const obtainDomains = require("./lib/obtainDomains");
77
const { DEFAULT_LAMBDA_CODE_DIR, API_LAMBDA_CODE_DIR } = require("./constants");
8-
const getAllFiles = require("./lib/getAllFiles");
98
const join = path.join;
109
const emptyDir = fse.emptyDir;
1110

@@ -18,21 +17,6 @@ class NextjsComponent extends Component {
1817
return this.deploy(inputs);
1918
}
2019

21-
async readPublicFiles(nextConfigPath) {
22-
const dirExists = await fse.exists(join(nextConfigPath, "public"));
23-
if (dirExists) {
24-
return getAllFiles(join(nextConfigPath, "public"))
25-
.map(e => e.replace(nextConfigPath, ""))
26-
.map(e =>
27-
e
28-
.split(path.sep)
29-
.slice(2)
30-
.join("/")
31-
);
32-
} else {
33-
return [];
34-
}
35-
}
3620
readDefaultBuildManifest(nextConfigPath) {
3721
return fse.readJSON(
3822
join(nextConfigPath, ".serverless_nextjs/default-lambda/manifest.json")
@@ -49,13 +33,6 @@ class NextjsComponent extends Component {
4933
: Promise.resolve(undefined);
5034
}
5135

52-
async emptyBuildDirectory(nextConfigPath) {
53-
return Promise.all([
54-
emptyDir(join(nextConfigPath, DEFAULT_LAMBDA_CODE_DIR)),
55-
emptyDir(join(nextConfigPath, API_LAMBDA_CODE_DIR))
56-
]);
57-
}
58-
5936
async build(inputs = {}) {
6037
const nextConfigPath = inputs.nextConfigDir
6138
? path.resolve(inputs.nextConfigDir)

0 commit comments

Comments
 (0)