@linktr.ee/create-link-app 1.8.0 → 1.9.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/dist/commands/create.js
CHANGED
|
@@ -26,7 +26,8 @@ class Create extends base_1.default {
|
|
|
26
26
|
this.log('\n✅ Project created, to get started:');
|
|
27
27
|
this.log(` cd ${relativeProjectPath}`);
|
|
28
28
|
this.log(` yarn install | npm install`);
|
|
29
|
-
this.log(` yarn
|
|
29
|
+
this.log(` yarn build | npm run build`);
|
|
30
|
+
this.log(` yarn dev | npm run dev\n`);
|
|
30
31
|
}
|
|
31
32
|
}
|
|
32
33
|
exports.default = Create;
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -2,89 +2,54 @@
|
|
|
2
2
|
|
|
3
3
|
This project contains files that form the basis of a new Link App project built with React.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Our public document: https://docs.linktr.ee/sdk-documentation
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## Getting Started
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Install dependencies: `yarn install` (or `npm install`).
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Once dependencies are installed, you can run a hot-reloaded local development server on [http://localhost:3000](http://localhost:3000) via:
|
|
12
|
+
`yarn dev` (or `npm run dev`)
|
|
12
13
|
|
|
13
14
|
## File Structure
|
|
14
15
|
|
|
15
16
|
Several files were created during the bootstrapping of this project. Some of these files play a key role:
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
| `fixtures/props-data.json` | Used during development, this file acts as mock data for the `settings.json` output, it is injected as props to the entry point component |
|
|
23
|
-
| `url-match-rules.json` | Defines the URL pattern to match against when users add a link on Linktree via URL, its structure follows the [URL Pattern API](https://developer.mozilla.org/en-US/docs/Web/API/URL_Pattern_API) |
|
|
24
|
-
|
|
18
|
+
- `src/App.jsx` which contains the React component for the presentation of you link-type on a linktree profile.
|
|
19
|
+
- `manifest.json` defines key information about your Link App, and helps users to discover your Link App via the [Linktree Marketplace](https://linktr.ee/marketplace)
|
|
20
|
+
- `settings.json` defines the settings made available to Linktree users when configuring the Link App via [Linktree Admin](https://linktr.ee/admin)
|
|
21
|
+
- `url-match-rules.json` | Defines the URL pattern to match against when users add a link on Linktree via URL, its structure follows the [URL Pattern API](https://developer.mozilla.org/en-US/docs/Web/API/URL_Pattern_API)
|
|
22
|
+
- `fixtures/props-data.json` used during development, this file acts as mock data for the `settings.json` output, it is injected as props to the entry point component.
|
|
25
23
|
|
|
26
24
|
## UI Components
|
|
27
25
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
## Deploying Your Link App
|
|
31
|
-
|
|
32
|
-
When you're ready to test your Link App, you can deploy it in `DRAFT` state and test it on [Linktr.ee](https://linktr.ee). You will require a Linktree account with developer privileges to do this, please contact Linktree if you need access.
|
|
33
|
-
|
|
34
|
-
### Login
|
|
35
|
-
|
|
36
|
-
To initiate the login flow, run the following:
|
|
37
|
-
|
|
38
|
-
`npx @linktr.ee/create-link-app login`
|
|
26
|
+
We recommend using libraries like [tailwindcss](https://tailwindcss.com/), [shadcn](https://ui.shadcn.com/) or other libraries to help you build link-app easily.
|
|
39
27
|
|
|
40
|
-
|
|
28
|
+
Linktree also provides a set of flexible UI components via `@linktr.ee/ui-link-kit` to build and customize your Link App. You can check out the list of components in Storybook.
|
|
41
29
|
|
|
42
|
-
Once login is successful, an access token will be stored locally on your machine under `~/.netrc`. Link App deployments will now use this token to authenticate requests.
|
|
43
30
|
|
|
44
|
-
|
|
31
|
+
## Publishing a link type
|
|
45
32
|
|
|
46
|
-
Before
|
|
33
|
+
Before submitting code for review, ensure that the properties in your `manifest.json` and `settings.json` data are accurate and complete.
|
|
47
34
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
`npm run deploy` or `yarn deploy`
|
|
51
|
-
|
|
52
|
-
This will push your Link App assets through to our build pipeline, where upon a successful build, your Link App will be published in `DRAFT` state.
|
|
53
|
-
|
|
54
|
-
Being in `DRAFT` will limit the Link App from public use and discovery, but you will be able to add the Link App via your Linktree Admin page and profile to validate its functionality.
|
|
55
|
-
|
|
56
|
-
## Submitting Your Link App for Review
|
|
57
|
-
|
|
58
|
-
Once you're satisfied that your Link App functions as expected, you can request a review from Linktree to have your Link App submitted to the Linktree Marketplace:
|
|
59
|
-
|
|
60
|
-
To submit your Link App for review:
|
|
61
|
-
|
|
62
|
-
**TODO: Submission flow**
|
|
35
|
+
### Login
|
|
63
36
|
|
|
64
|
-
|
|
37
|
+
First, login to Linktree link-app, run `yarn login-app` (or `npm run login-app`).
|
|
65
38
|
|
|
66
|
-
|
|
39
|
+
### Package your code
|
|
67
40
|
|
|
68
|
-
|
|
41
|
+
From the root of this directory, run `yarn build` (or `npm run build`) to bundle the UI code.
|
|
69
42
|
|
|
70
|
-
|
|
43
|
+
### Publish your link type
|
|
71
44
|
|
|
72
|
-
|
|
45
|
+
Publishing a link type involves pushing your code to Linktree to make it available for testing on your linktree profile.
|
|
73
46
|
|
|
74
|
-
|
|
47
|
+
Publish your link via `yarn upload` (or `npm run upload`).
|
|
75
48
|
|
|
76
|
-
|
|
49
|
+
Your link-type will be published in a `DRAFT` state - the link-type will not be available for use by Linktree users, but you will be able to add this link type to your Linktree profile in order to test and validate that it functions as expected.
|
|
77
50
|
|
|
78
|
-
|
|
51
|
+
(NOTE once your application is PUBLISHED, only linktree admin can help you update it).
|
|
79
52
|
|
|
80
|
-
|
|
53
|
+
## Submit your link type for review
|
|
81
54
|
|
|
82
|
-
|
|
83
|
-
| --------------------------- | ------- | ---------- | ----------------------------------------------- |
|
|
84
|
-
| Create Link App | ✓ | N/A | Owner is defined when Link App is first created |
|
|
85
|
-
| Get Link App | ✓ | ✓ | |
|
|
86
|
-
| Update Link App | ✓ | ✓ | |
|
|
87
|
-
| Request Link App review | ✓ | ✓ | |
|
|
88
|
-
| Get Link App maintainers | ✓ | ✓ | |
|
|
89
|
-
| Add new Link App maintainer | ✓ | ✗ | |
|
|
90
|
-
| Remove Link App maintainer | ✓ | ✗ | |
|
|
55
|
+
Once you are satisfied that your link-type functions as expected, you can request a review from Linktree to have your link-type submitted to the Link Types Marketplace. Please contact us!
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
"private": true,
|
|
3
3
|
"scripts": {
|
|
4
4
|
"build": "create-link-app build",
|
|
5
|
-
"login": "create-link-app login",
|
|
6
|
-
"logout": "create-link-app logout",
|
|
5
|
+
"login-app": "create-link-app login",
|
|
6
|
+
"logout-app": "create-link-app logout",
|
|
7
7
|
"upload": "create-link-app deploy",
|
|
8
|
-
"storybook": "create-link-app storybook",
|
|
9
8
|
"dev": "create-link-app dev",
|
|
10
9
|
"prepack": "create-link-app build --native",
|
|
11
10
|
"test-url-match-rules": "create-link-app test-url-match-rules"
|