@linktr.ee/create-link-app 0.1.0

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.
Files changed (46) hide show
  1. package/README.md +171 -0
  2. package/bin/dev +17 -0
  3. package/bin/dev.cmd +3 -0
  4. package/bin/run +5 -0
  5. package/bin/run.cmd +3 -0
  6. package/dist/base.js +16 -0
  7. package/dist/commands/build.js +35 -0
  8. package/dist/commands/create.js +53 -0
  9. package/dist/commands/deploy.js +60 -0
  10. package/dist/commands/dev.js +37 -0
  11. package/dist/commands/grant-access.js +64 -0
  12. package/dist/commands/login.js +40 -0
  13. package/dist/commands/logout.js +30 -0
  14. package/dist/index.js +5 -0
  15. package/dist/lib/auth/access-token.js +67 -0
  16. package/dist/lib/auth/device-auth.js +26 -0
  17. package/dist/lib/create/create-project.js +17 -0
  18. package/dist/lib/create/install-dependencies.js +11 -0
  19. package/dist/lib/create/is-using-yarn.js +6 -0
  20. package/dist/lib/deploy/create-form-data.js +60 -0
  21. package/dist/lib/deploy/pack-project.js +55 -0
  22. package/dist/lib/deploy/upload-assets.js +17 -0
  23. package/dist/lib/fetch-app-config.js +20 -0
  24. package/dist/types.js +2 -0
  25. package/dist/webpack/development.entry.js +59 -0
  26. package/dist/webpack/production.entry.js +38 -0
  27. package/dist/webpack/webpack.config.js +113 -0
  28. package/html-template/development.html +16 -0
  29. package/html-template/production.html +20 -0
  30. package/oclif.manifest.json +1 -0
  31. package/package.json +84 -0
  32. package/templates/common/.prettierrc +10 -0
  33. package/templates/common/README.md +89 -0
  34. package/templates/common/fixtures/props-data.json +4 -0
  35. package/templates/common/gitignore +3 -0
  36. package/templates/common/manifest.json +23 -0
  37. package/templates/common/settings.json +33 -0
  38. package/templates/common/url-match-rules.json +0 -0
  39. package/templates/react/package.json +12 -0
  40. package/templates/react/src/index.jsx +18 -0
  41. package/templates/react-ts/package.json +14 -0
  42. package/templates/react-ts/src/images/logo.png +0 -0
  43. package/templates/react-ts/src/index.tsx +19 -0
  44. package/templates/react-ts/src/types/global.d.ts +4 -0
  45. package/templates/react-ts/src/types/index.ts +7 -0
  46. package/templates/react-ts/tsconfig.json +20 -0
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "Example Link Type",
3
+ "tagline": "A simple greeting link",
4
+ "description": [
5
+ "The simple greeting link is an example link type which enables a user to to show a simple greeting on their linktr.ee profile.",
6
+ "This example code acts as a base for experimenting with link type capabilities"
7
+ ],
8
+ "manifest_version": "1.0.0",
9
+ "supporting_links": {
10
+ "terms_of_service": "https://example.com/terms-of-service",
11
+ "privacy_policy": "https://example.com/privacy-policy"
12
+ },
13
+ "category": "grow",
14
+ "search_terms": ["search term 1", "search term 2"],
15
+ "author": {
16
+ "name": "Linktree",
17
+ "accounts": ["your_linktree_username"],
18
+ "contact": {
19
+ "url": "https://linktr.ee",
20
+ "email": "hello@linktr.ee"
21
+ }
22
+ }
23
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "title": "Link Type",
3
+ "overview": {
4
+ "title": "You can have a heading",
5
+ "description": "as well as a description to inform users on what the link does."
6
+ },
7
+ "elements": [
8
+ {
9
+ "inputType": "linkBehavior",
10
+ "id": "how_link_behaves",
11
+ "title": "How would you like the link to behave?",
12
+ "description": "When a user interacts with this link:",
13
+ "linkBehaviorLabels": {
14
+ "embedLabel": "Embed content on the profile",
15
+ "linkOffLabel": "Go directly to URL"
16
+ },
17
+ "defaultValue": "embedLabel"
18
+ },
19
+ {
20
+ "inputType": "switch",
21
+ "id": "toggle",
22
+ "title": "Use another title/description to break up content",
23
+ "description": "and describe what the next section of inputs will do",
24
+ "label": "Is feature enabled?",
25
+ "defaultValue": true
26
+ },
27
+ {
28
+ "inputType": "text",
29
+ "id": "your_name",
30
+ "label": "elements that only have a label will stick close the element above"
31
+ }
32
+ ]
33
+ }
File without changes
@@ -0,0 +1,12 @@
1
+ {
2
+ "private": true,
3
+ "scripts": {
4
+ "build": "create-link-app build",
5
+ "deploy": "create-link-app deploy",
6
+ "dev": "create-link-app dev"
7
+ },
8
+ "devDependencies": {
9
+ "@linktr.ee/create-link-app": "latest",
10
+ "@linktr.ee/ui-link-kit": "latest"
11
+ }
12
+ }
@@ -0,0 +1,18 @@
1
+ import React from 'react'
2
+ import { Contact } from '@linktr.ee/ui-link-kit'
3
+
4
+ function App({ toggle, your_name, __linkUrl }) {
5
+ return (
6
+ <Contact
7
+ loading={false}
8
+ heading={`Hello ${your_name}!`}
9
+ secondaryHeading="Congratulations, you now have a Linktree link!"
10
+ content=""
11
+ primaryCta={toggle ? { label: 'Visit our UI docs for more info', href: 'https://blstrco.github.io/ui-link-kit/' } : null}
12
+ secondaryCta={toggle ? { label: 'Original url for your Linktree link', href: __linkUrl } : null}
13
+ logo=""
14
+ />
15
+ )
16
+ }
17
+
18
+ export default App
@@ -0,0 +1,14 @@
1
+ {
2
+ "private": true,
3
+ "scripts": {
4
+ "build": "create-link-app build",
5
+ "deploy": "create-link-app deploy",
6
+ "dev": "create-link-app dev"
7
+ },
8
+ "devDependencies": {
9
+ "@linktr.ee/create-link-app": "latest",
10
+ "@linktr.ee/ui-link-kit": "latest",
11
+ "@types/react": "^17.0.0",
12
+ "@types/react-dom": "^17.0.0"
13
+ }
14
+ }
@@ -0,0 +1,19 @@
1
+ import { Container, Description, Header } from '@linktr.ee/ui-link-kit'
2
+ import { SettingsData } from './types'
3
+
4
+ import logo from './images/logo.png'
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="banner" />
14
+ <Description>{your_name}</Description>
15
+ </Container>
16
+ )
17
+ }
18
+
19
+ export default App
@@ -0,0 +1,4 @@
1
+ declare module '*.jpg'
2
+ declare module '*.png'
3
+ declare module '*.jpeg'
4
+ declare module '*.gif'
@@ -0,0 +1,7 @@
1
+ type LinktreeLinkContext = {
2
+ __linkUrl: string
3
+ }
4
+ export type SettingsData = {
5
+ toggle: boolean
6
+ your_name: string
7
+ } & LinktreeLinkContext
@@ -0,0 +1,20 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "es5",
4
+ "lib": ["dom", "dom.iterable", "esnext"],
5
+ "allowJs": true,
6
+ "skipLibCheck": true,
7
+ "esModuleInterop": true,
8
+ "allowSyntheticDefaultImports": true,
9
+ "strict": true,
10
+ "forceConsistentCasingInFileNames": true,
11
+ "noFallthroughCasesInSwitch": true,
12
+ "module": "esnext",
13
+ "moduleResolution": "node",
14
+ "resolveJsonModule": true,
15
+ "isolatedModules": true,
16
+ "noEmit": true,
17
+ "jsx": "react-jsx"
18
+ },
19
+ "include": ["src"]
20
+ }