@remix-run/cli 0.3.1 → 0.3.2
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/dist/lib/bootstrap-project.js +7 -4
- package/package.json +3 -3
- package/src/lib/bootstrap-project.ts +9 -6
- package/template/.agents/skills/remix/SKILL.md +115 -262
- package/template/.agents/skills/remix/references/animate-elements.md +8 -17
- package/template/.agents/skills/remix/references/assets-and-browser-modules.md +14 -33
- package/template/.agents/skills/remix/references/auth-and-sessions.md +10 -31
- package/template/.agents/skills/remix/references/component-model.md +11 -26
- package/template/.agents/skills/remix/references/create-mixins.md +4 -9
- package/template/.agents/skills/remix/references/data-and-validation.md +54 -77
- package/template/.agents/skills/remix/references/hydration-frames-navigation.md +23 -56
- package/template/.agents/skills/remix/references/middleware-and-server.md +17 -38
- package/template/.agents/skills/remix/references/mixins-styling-events.md +14 -32
- package/template/.agents/skills/remix/references/routing-and-controllers.md +17 -43
- package/template/.agents/skills/remix/references/testing-patterns.md +13 -32
- package/template/app/ui/document.tsx +22 -17
- package/template/app/ui/scaffold-home-page.tsx +56 -47
|
@@ -7,7 +7,7 @@ import { appNameUnavailable, invalidPackageName, targetDirectoryNotEmpty, target
|
|
|
7
7
|
import { runProgressStep } from "./reporter.js";
|
|
8
8
|
const MODULE_DIRECTORY = path.dirname(fileURLToPath(import.meta.url));
|
|
9
9
|
const PACKAGE_TEMPLATE_DIRECTORY = path.resolve(MODULE_DIRECTORY, '../../template');
|
|
10
|
-
const
|
|
10
|
+
const IS_RUNNING_FROM_SRC = path.extname(new URL(import.meta.url).pathname) === '.ts';
|
|
11
11
|
const TEMPLATE_EXCLUDED_NAMES = new Set(['.gitkeep', 'node_modules']);
|
|
12
12
|
export const MINIMUM_SUPPORTED_NODE_VERSION = '24.3.0';
|
|
13
13
|
export async function bootstrapProject(options, progress) {
|
|
@@ -55,10 +55,13 @@ async function resolveTemplateDirectory() {
|
|
|
55
55
|
if (await isDirectory(PACKAGE_TEMPLATE_DIRECTORY)) {
|
|
56
56
|
return PACKAGE_TEMPLATE_DIRECTORY;
|
|
57
57
|
}
|
|
58
|
-
if (
|
|
59
|
-
|
|
58
|
+
if (IS_RUNNING_FROM_SRC) {
|
|
59
|
+
throw new Error([
|
|
60
|
+
`Could not find the prepared Remix app template at ${PACKAGE_TEMPLATE_DIRECTORY}.`,
|
|
61
|
+
'Run `pnpm --filter @remix-run/cli run prepack` from the repository root to generate it.',
|
|
62
|
+
].join('\n'));
|
|
60
63
|
}
|
|
61
|
-
throw new Error(`Could not find the Remix app template at ${PACKAGE_TEMPLATE_DIRECTORY}
|
|
64
|
+
throw new Error(`Could not find the Remix app template at ${PACKAGE_TEMPLATE_DIRECTORY}.`);
|
|
62
65
|
}
|
|
63
66
|
async function isDirectory(directory) {
|
|
64
67
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remix-run/cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "Command-line interface for Remix",
|
|
5
5
|
"author": "Michael Jackson <mjijackson@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"semver": "^7.7.4",
|
|
34
|
-
"@remix-run/
|
|
35
|
-
"@remix-run/
|
|
34
|
+
"@remix-run/test": "^0.4.2",
|
|
35
|
+
"@remix-run/terminal": "^0.1.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/node": "^24.6.0",
|
|
@@ -14,7 +14,7 @@ import { runProgressStep, type StepProgressReporter } from './reporter.ts'
|
|
|
14
14
|
|
|
15
15
|
const MODULE_DIRECTORY = path.dirname(fileURLToPath(import.meta.url))
|
|
16
16
|
const PACKAGE_TEMPLATE_DIRECTORY = path.resolve(MODULE_DIRECTORY, '../../template')
|
|
17
|
-
const
|
|
17
|
+
const IS_RUNNING_FROM_SRC = path.extname(new URL(import.meta.url).pathname) === '.ts'
|
|
18
18
|
const TEMPLATE_EXCLUDED_NAMES = new Set(['.gitkeep', 'node_modules'])
|
|
19
19
|
export const MINIMUM_SUPPORTED_NODE_VERSION = '24.3.0'
|
|
20
20
|
|
|
@@ -109,13 +109,16 @@ async function resolveTemplateDirectory(): Promise<string> {
|
|
|
109
109
|
return PACKAGE_TEMPLATE_DIRECTORY
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
if (
|
|
113
|
-
|
|
112
|
+
if (IS_RUNNING_FROM_SRC) {
|
|
113
|
+
throw new Error(
|
|
114
|
+
[
|
|
115
|
+
`Could not find the prepared Remix app template at ${PACKAGE_TEMPLATE_DIRECTORY}.`,
|
|
116
|
+
'Run `pnpm --filter @remix-run/cli run prepack` from the repository root to generate it.',
|
|
117
|
+
].join('\n'),
|
|
118
|
+
)
|
|
114
119
|
}
|
|
115
120
|
|
|
116
|
-
throw new Error(
|
|
117
|
-
`Could not find the Remix app template at ${PACKAGE_TEMPLATE_DIRECTORY} or ${REPO_TEMPLATE_DIRECTORY}.`,
|
|
118
|
-
)
|
|
121
|
+
throw new Error(`Could not find the Remix app template at ${PACKAGE_TEMPLATE_DIRECTORY}.`)
|
|
119
122
|
}
|
|
120
123
|
|
|
121
124
|
async function isDirectory(directory: string): Promise<boolean> {
|