create-upwind 0.2.0
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/LICENSE-APACHE +201 -0
- package/LICENSE-MIT +21 -0
- package/NOTICE +9 -0
- package/README.md +79 -0
- package/dist/cli.js +524 -0
- package/package.json +35 -0
- package/src/args.ts +70 -0
- package/src/cli.ts +66 -0
- package/src/create.ts +123 -0
- package/src/git.ts +75 -0
- package/src/manifest.ts +70 -0
- package/src/name.ts +40 -0
- package/src/package-manager.ts +70 -0
- package/src/prompt.ts +61 -0
- package/src/template.ts +69 -0
- package/src/version.ts +36 -0
- package/templates/default/README.md +47 -0
- package/templates/default/app/globals.css +1 -0
- package/templates/default/app/layout.tsx +16 -0
- package/templates/default/app/page.tsx +13 -0
- package/templates/default/gitignore +33 -0
- package/templates/default/next.config.ts +26 -0
- package/templates/default/postcss.config.mjs +7 -0
- package/templates/default/tsconfig.json +28 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';
|
|
2
|
+
|
|
3
|
+
import type { NextConfig } from 'next';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The deployment adapter, resolved from this project.
|
|
7
|
+
*
|
|
8
|
+
* `next build` loads the adapter by path, and resolves that path from Next.js's own module rather
|
|
9
|
+
* than from here — so a bare package name would be looked for beside Next.js, where a strict
|
|
10
|
+
* `node_modules` does not have it. Resolving it here names the copy this project installed.
|
|
11
|
+
*
|
|
12
|
+
* `import.meta.url` holds however Next.js reads this file. Read as ES modules it is this file; read
|
|
13
|
+
* the way Next.js reads a `next.config.ts` by default — transpiled to CommonJS by SWC — it becomes
|
|
14
|
+
* `pathToFileURL(__filename)`, and the filename that build compiles under is in this directory. Both
|
|
15
|
+
* resolve from the project, which is the only place that has the adapter. Basing it on the current
|
|
16
|
+
* directory instead would be wrong for a `next build ./some-app` run from anywhere else.
|
|
17
|
+
*
|
|
18
|
+
* `upwind build` sets the same thing in the environment, so a build started that way needs nothing
|
|
19
|
+
* from this file. This line is what makes a plain `next build` — from CI, from a script, from
|
|
20
|
+
* anything that does not know about upwind — produce the same deployment bundle.
|
|
21
|
+
*/
|
|
22
|
+
const config: NextConfig = {
|
|
23
|
+
adapterPath: createRequire(import.meta.url).resolve('@stayingupwind/adapter'),
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export default config;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2017",
|
|
4
|
+
"lib": ["dom", "dom.iterable", "esnext"],
|
|
5
|
+
"allowJs": true,
|
|
6
|
+
"skipLibCheck": true,
|
|
7
|
+
"strict": true,
|
|
8
|
+
"noEmit": true,
|
|
9
|
+
"incremental": true,
|
|
10
|
+
"module": "esnext",
|
|
11
|
+
"esModuleInterop": true,
|
|
12
|
+
"moduleResolution": "bundler",
|
|
13
|
+
"resolveJsonModule": true,
|
|
14
|
+
"isolatedModules": true,
|
|
15
|
+
"jsx": "react-jsx",
|
|
16
|
+
"plugins": [{ "name": "next" }],
|
|
17
|
+
"paths": { "@/*": ["./*"] }
|
|
18
|
+
},
|
|
19
|
+
"include": [
|
|
20
|
+
"next-env.d.ts",
|
|
21
|
+
".next/types/**/*.ts",
|
|
22
|
+
".next/dev/types/**/*.ts",
|
|
23
|
+
"**/*.mts",
|
|
24
|
+
"**/*.ts",
|
|
25
|
+
"**/*.tsx"
|
|
26
|
+
],
|
|
27
|
+
"exclude": ["node_modules"]
|
|
28
|
+
}
|