@sanity/cli 3.78.0 → 3.78.1
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/lib/_chunks-cjs/cli.js +289 -96
- package/lib/_chunks-cjs/cli.js.map +1 -1
- package/lib/_chunks-cjs/loadEnv.js +5 -5
- package/lib/_chunks-cjs/loadEnv.js.map +1 -1
- package/lib/index.d.mts +0 -1
- package/lib/index.d.ts +0 -1
- package/lib/index.esm.js +5 -5
- package/lib/index.esm.js.map +1 -1
- package/lib/index.mjs +5 -5
- package/lib/index.mjs.map +1 -1
- package/package.json +9 -8
- package/src/actions/init-project/initProject.ts +117 -40
- package/src/actions/init-project/templates/coreApp.ts +3 -4
- package/src/cli.ts +4 -14
- package/src/commands/functions/devFunctionsCommand.ts +42 -0
- package/src/commands/functions/functionsGroup.ts +11 -0
- package/src/commands/functions/logsFunctionsCommand.ts +46 -0
- package/src/commands/functions/testFunctionsCommand.ts +62 -0
- package/src/commands/index.ts +8 -0
- package/src/commands/init/initCommand.ts +0 -1
- package/src/types.ts +0 -1
- package/src/util/resolveRootDir.ts +5 -5
- package/templates/core-app/src/App.css +18 -0
- package/templates/core-app/src/App.tsx +8 -12
- package/templates/core-app/src/ExampleComponent.css +26 -0
- package/templates/core-app/src/ExampleComponent.tsx +15 -4
@@ -1,11 +1,22 @@
|
|
1
|
+
import './ExampleComponent.css'
|
2
|
+
|
1
3
|
export function ExampleComponent() {
|
2
4
|
return (
|
3
|
-
<div>
|
4
|
-
<h1>Welcome to
|
5
|
-
<p>
|
5
|
+
<div className="example-container">
|
6
|
+
<h1 className="example-heading">Welcome to your Sanity App!</h1>
|
7
|
+
<p className="example-text">
|
6
8
|
This is an example component. You can replace this with your own content
|
7
9
|
by creating a new component and importing it in App.tsx.
|
8
10
|
</p>
|
11
|
+
<div className="code-hint">
|
12
|
+
<p>Quick tip: Create new components in separate files and import them like this in App.tsx / App.jsx:</p>
|
13
|
+
<pre>{`import {YourComponent} from './YourComponent'
|
14
|
+
|
15
|
+
// Then use it in your JSX
|
16
|
+
<SanityApp sanityConfig={sanityConfig}>
|
17
|
+
<YourComponent />
|
18
|
+
</SanityApp>`}</pre>
|
19
|
+
</div>
|
9
20
|
</div>
|
10
21
|
)
|
11
|
-
}
|
22
|
+
}
|