@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.
@@ -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 dev | npm run dev\n`);
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;
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.8.0",
2
+ "version": "1.9.1",
3
3
  "commands": {
4
4
  "build": {
5
5
  "id": "build",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@linktr.ee/create-link-app",
3
- "version": "1.8.0",
3
+ "version": "1.9.1",
4
4
  "description": "Create a Link App on Linktr.ee.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "Linktree",
@@ -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
- ## Getting Started
5
+ Our public document: https://docs.linktr.ee/sdk-documentation
6
6
 
7
- To start developing your Link App, you can run a local development server on [http://localhost:3000](http://localhost:3000) via:
7
+ ## Getting Started
8
8
 
9
- `npm run dev` or `yarn dev`
9
+ Install dependencies: `yarn install` (or `npm install`).
10
10
 
11
- Optionally, you can specify a different port or serve over HTTPS. Run command with `--help` for more information.
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
- | File | Description |
18
- | -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
19
- | `src/index.jsx` | The entry point for your Link App |
20
- | `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) |
21
- | `settings.json` | Defines the settings made available to Linktree users when configuring the Link App via [Linktree Admin](https://linktr.ee/admin) |
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
- Linktree 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.
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
- This will open a login page in your default browser. Follow the prompts and sign in with your Linktree account credentials.
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
- ### Deploy
31
+ ## Publishing a link type
45
32
 
46
- Before deployment, please ensure that the properties in your `manifest.json` and `settings.json` data are accurate and complete.
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
- Deploy your Link App via:
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
- Linktree will review and test your Link App, requesting changes if necessary. Following approval, your Link App will be put in the `PUBLISHED` state and made available via the Linktree Marketplace for public use.
37
+ First, login to Linktree link-app, run `yarn login-app` (or `npm run login-app`).
65
38
 
66
- ## Granting Access to Additional Developers
39
+ ### Package your code
67
40
 
68
- Once a Link App has been deployed for the first time, the user who deployed it will be set as the `Owner` of the Link App by default. The `Owner` role represents a set of elevated admin-like access privileges granted to the user for actions that can be performed on the Link App. Initially only the `Owner` will have access to retrieve and modify the Link App.
41
+ From the root of this directory, run `yarn build` (or `npm run build`) to bundle the UI code.
69
42
 
70
- Access to a Link App can be granted to additional users who may need to retrieve data or make changes to the Link App. You can grant a `Maintainer` role to a user for your Link App via the `grant-access` command:
43
+ ### Publish your link type
71
44
 
72
- `npx @linktr.ee/create-link-app grant-access <link_app_id> <username>`
45
+ Publishing a link type involves pushing your code to Linktree to make it available for testing on your linktree profile.
73
46
 
74
- Please note the user receiving access must also have a Linktree account with developer privileges. Maintainer access can be granted to as many developer accounts as required.
47
+ Publish your link via `yarn upload` (or `npm run upload`).
75
48
 
76
- **_Note: Only the Link App Owner can grant Maintainer access to additional users. You must be logged in with an Owner account in order to use the command._**
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
- ### Maintainer and Owner Permitted Actions
51
+ (NOTE once your application is PUBLISHED, only linktree admin can help you update it).
79
52
 
80
- The following table compares which actions are permitted for Maintainers and Owners:
53
+ ## Submit your link type for review
81
54
 
82
- | Action | Owner | Maintainer | Notes |
83
- | --------------------------- | ------- | ---------- | ----------------------------------------------- |
84
- | Create Link App | &check; | N/A | Owner is defined when Link App is first created |
85
- | Get Link App | &check; | &check; | |
86
- | Update Link App | &check; | &check; | |
87
- | Request Link App review | &check; | &check; | |
88
- | Get Link App maintainers | &check; | &check; | |
89
- | Add new Link App maintainer | &check; | &cross; | |
90
- | Remove Link App maintainer | &check; | &cross; | |
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!
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "title": "Link App",
3
3
  "has_url": false,
4
+ "supports_featured_layout": true,
4
5
  "elements": [
5
6
  {
6
7
  "id": "url",
@@ -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"