This repository has been archived by the owner on Apr 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.projenrc.js
77 lines (67 loc) · 2.82 KB
/
.projenrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
const { NodePackageManager, NpmAccess, TypeScriptProject } = require('projen');
const project = new TypeScriptProject({
authorEmail: 'harold@pwrdrvr.com',
authorName: 'Harold Hunt',
authorOrganization: 'PwrDrvr LLC',
copyrightOwner: 'PwrDrvr LLC',
copyrightPeriod: '2020',
defaultReleaseBranch: 'main',
license: 'MIT',
name: '@pwrdrvr/serverless-nextjs-router',
npmAccess: NpmAccess.PUBLIC,
packageManager: NodePackageManager.NPM,
minNodeVersion: '12.0.0',
// Settings for GitHub Packages publish:
// npmRegistryUrl: 'https://npm.pkg.github.com',
// npmTokenSecret: 'NPM_TOKEN',
npmTokenSecret: 'NPMJSORG_PUBLISH_TOKEN',
releaseToNpm: true,
description:
'Enables running `serverless-next.js` applications using Origin Lamdbda functions for reduced cost and improved speed.',
keywords: ['serverless', 'next.js', 'lamda', 'aws', 'serverless-next.js'],
eslintOptions: {
prettier: true,
},
repository: 'git://github.com/pwrdrvr/serverless-nextjs-router.git',
tsconfig: {
compilerOptions: {
// DOM is needed when specifying `lib` to avoid Blob and ReadableStream errors
// on `node_modules/@aws-sdk/client-s3/S3Client.ts:631:60` like:
// - error TS2304: Cannot find name 'Blob'.
// - error TS2304: Cannot find name 'ReadableStream'.
// https://github.com/microsoft/TypeScript/issues/14897
lib: ['es2018', 'dom'],
skipLibCheck: true,
esModuleInterop: true,
},
},
devDeps: [
'@rollup/plugin-commonjs@^17.1.0',
'@rollup/plugin-json@^4.1.0',
'@rollup/plugin-node-resolve@^11.2.0',
'@types/aws-lambda@^8.10.72',
'@types/lambda-log@^2.2.0',
'aws-sdk-client-mock@^0.5.6',
'rollup@^2.39.0',
'rollup-plugin-node-externals@^2.2.0',
'rollup-plugin-terser@^7.0.2',
'rollup-plugin-typescript2@^0.30.0',
],
deps: ['@aws-sdk/client-s3@^3.32.0', 'get-stream@^6.0.0', 'lambda-log@^2.4.0'],
// scripts: {
// 'compile': 'rollup --config && tsc -p tsconfig.build.json',
// 'cloc': 'cloc --exclude-dir=node_modules,.storybook,.serverless,.serverless_nextjs,.next,storybook-static,dist --exclude-ext=json .'
// },
// postBuildSteps: [
// { run }
// ]
// deps: [], /* Runtime dependencies of this module. */
// description: undefined, /* The description is just a string that helps people understand the purpose of the package. */
// devDeps: [], /* Build dependencies for this module. */
// packageName: undefined, /* The "name" in package.json. */
// release: undefined, /* Add release management to this project. */
});
// We have to override the default build as we need a very specific rollup with deps
// and WITHOUT the underlying app .js files from serverless-next.js
project.compileTask.exec('rm -rf lib/ && rollup --config && tsc -p tsconfig.build.json');
project.synth();