@linktr.ee/create-link-app 0.3.0-next.7 → 0.3.0-next.8
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/create/create-project.js +3 -0
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
- package/templates/common/fixtures/props-data.json +1 -2
- package/templates/react/package.json +2 -0
- package/templates/react/src/index.jsx +3 -14
- package/templates/react-ts/package.json +2 -0
- package/templates/react-ts/src/index.tsx +3 -14
- package/templates/react-ts/src/stories/LinkApp.stories.tsx +38 -0
- package/templates/react-ts/src/types/global.d.ts +4 -5
- package/templates/react-ts/src/types/index.ts +4 -3
- package/templates/react/src/images/logo.png +0 -0
- package/templates/react-ts/src/images/logo.png +0 -0
|
@@ -14,6 +14,9 @@ const createProject = async (template, targetDir) => {
|
|
|
14
14
|
await fs_extra_1.default.copy(templateDir, targetDir);
|
|
15
15
|
await fs_extra_1.default.copy(templateCommonDir, targetDir);
|
|
16
16
|
await fs_extra_1.default.move(`${targetDir}/gitignore`, `${targetDir}/.gitignore`);
|
|
17
|
+
if (await fs_extra_1.default.existsSync(`${targetDir}/src/types/global.d.ts`)) {
|
|
18
|
+
await fs_extra_1.default.unlink(`${targetDir}/src/types/global.d.ts`);
|
|
19
|
+
}
|
|
17
20
|
// update `name` field in project manifest
|
|
18
21
|
const manifest = await fs_extra_1.default.readJson(`${targetDir}/manifest.json`);
|
|
19
22
|
manifest.name = (0, project_name_to_title_1.default)(path_1.default.basename(targetDir));
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -3,9 +3,11 @@
|
|
|
3
3
|
"scripts": {
|
|
4
4
|
"build": "create-link-app build",
|
|
5
5
|
"deploy": "create-link-app deploy",
|
|
6
|
+
"storybook": "create-link-app storybook",
|
|
6
7
|
"dev": "create-link-app dev"
|
|
7
8
|
},
|
|
8
9
|
"devDependencies": {
|
|
10
|
+
"@linktr.ee/component-library": "latest",
|
|
9
11
|
"@linktr.ee/create-link-app": "latest",
|
|
10
12
|
"@linktr.ee/ui-link-kit": "latest"
|
|
11
13
|
}
|
|
@@ -1,18 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import P from '@linktr.ee/component-library/P'
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
function App({ toggle, your_name, __linkUrl }) {
|
|
6
|
-
return (
|
|
7
|
-
<Container
|
|
8
|
-
primaryCta={toggle ? { label: 'Visit our UI docs for more info', href: 'https://blstrco.github.io/ui-link-kit/' } : null}
|
|
9
|
-
secondaryCta={toggle ? { label: 'Original url for your Linktree link', href: __linkUrl } : null}
|
|
10
|
-
logo={logo}
|
|
11
|
-
>
|
|
12
|
-
<Header heading={`Hello ${your_name}!`} secondaryHeading="Congratulations, you now have a Linktree link!" layout="hero" />
|
|
13
|
-
<Description>{your_name}</Description>
|
|
14
|
-
</Container>
|
|
15
|
-
)
|
|
3
|
+
function App({ title }) {
|
|
4
|
+
return <P>{title}</P>
|
|
16
5
|
}
|
|
17
6
|
|
|
18
7
|
export default App
|
|
@@ -3,9 +3,11 @@
|
|
|
3
3
|
"scripts": {
|
|
4
4
|
"build": "create-link-app build",
|
|
5
5
|
"deploy": "create-link-app deploy",
|
|
6
|
+
"storybook": "create-link-app storybook",
|
|
6
7
|
"dev": "create-link-app dev"
|
|
7
8
|
},
|
|
8
9
|
"devDependencies": {
|
|
10
|
+
"@linktr.ee/component-library": "latest",
|
|
9
11
|
"@linktr.ee/create-link-app": "latest",
|
|
10
12
|
"@linktr.ee/ui-link-kit": "latest",
|
|
11
13
|
"@types/react": "^17.0.0",
|
|
@@ -1,19 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import P from '@linktr.ee/component-library/P'
|
|
2
2
|
import { SettingsData } from './types'
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
function App({ toggle, your_name, __linkUrl }: SettingsData) {
|
|
7
|
-
return (
|
|
8
|
-
<Container
|
|
9
|
-
primaryCta={toggle ? { label: 'Visit our UI docs for more info', href: 'https://blstrco.github.io/ui-link-kit/' } : null}
|
|
10
|
-
secondaryCta={toggle ? { label: 'Original url for your Linktree link', href: __linkUrl } : null}
|
|
11
|
-
logo={logo}
|
|
12
|
-
>
|
|
13
|
-
<Header heading={`Hello ${your_name}!`} secondaryHeading="Congratulations, you now have a Linktree link!" layout="hero" />
|
|
14
|
-
<Description>{your_name}</Description>
|
|
15
|
-
</Container>
|
|
16
|
-
)
|
|
4
|
+
function App({ title }: SettingsData) {
|
|
5
|
+
return <P>{title}</P>
|
|
17
6
|
}
|
|
18
7
|
|
|
19
8
|
export default App
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { ComponentStory, ComponentMeta } from '@storybook/react'
|
|
3
|
+
import { name } from '../../manifest.json'
|
|
4
|
+
|
|
5
|
+
import LinkApp from '..'
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
title: `Link App/${name}`,
|
|
9
|
+
component: LinkApp,
|
|
10
|
+
tags: ['autodocs'],
|
|
11
|
+
parameters: {
|
|
12
|
+
layout: 'fullscreen',
|
|
13
|
+
},
|
|
14
|
+
} as ComponentMeta<typeof LinkApp>
|
|
15
|
+
|
|
16
|
+
export const Stack: ComponentStory<typeof LinkApp> = () => (
|
|
17
|
+
<div className="bg-marble rounded-lg p-2 m-2 w-[375px]">
|
|
18
|
+
<LinkApp layout="STACK" editing={false} title="Test Stack" />
|
|
19
|
+
</div>
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
export const Grid: ComponentStory<typeof LinkApp> = () => (
|
|
23
|
+
<div className="bg-marble rounded-lg p-2 m-2 w-[150px]">
|
|
24
|
+
<LinkApp layout="GRID" editing={false} title="Test Grid" />
|
|
25
|
+
</div>
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
export const Carousel: ComponentStory<typeof LinkApp> = () => (
|
|
29
|
+
<div className="bg-marble rounded-lg p-2 m-2 w-[225px]">
|
|
30
|
+
<LinkApp layout="CAROUSEL" editing={false} title="Test Carousel" />
|
|
31
|
+
</div>
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
export const Featured: ComponentStory<typeof LinkApp> = () => (
|
|
35
|
+
<div className="bg-marble rounded-lg p-2 m-2 w-[384px]">
|
|
36
|
+
<LinkApp layout="FEATURED" editing={false} title="Test Featured" />
|
|
37
|
+
</div>
|
|
38
|
+
)
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
declare module '
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
declare module '*.svg'
|
|
1
|
+
// @HACK: This file is removed at build time, but we need it for type checking
|
|
2
|
+
declare module '*manifest.json' {
|
|
3
|
+
export const name: string
|
|
4
|
+
}
|
|
Binary file
|
|
Binary file
|