refactor: init new version

This commit is contained in:
Daniel Soares
2021-12-10 20:54:28 -03:00
parent eb8ab7029a
commit db839b267a
31 changed files with 2177 additions and 14915 deletions

3
.commitlintrc.json Normal file
View File

@@ -0,0 +1,3 @@
{
"extends": ["@commitlint/config-conventional"]
}

9
.editorconfig Normal file
View File

@@ -0,0 +1,9 @@
root = true
[*]
charset = utf-8
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 2
end_of_line = lf

9
.eslintrc.json Normal file
View File

@@ -0,0 +1,9 @@
{
"extends": ["next", "next/core-web-vitals", "plugin:prettier/recommended"],
"plugins": ["prettier", "simple-import-sort"],
"rules": {
"prettier/prettier": "error",
"simple-import-sort/imports": "error",
"simple-import-sort/exports": "error"
}
}

55
.gitignore vendored
View File

@@ -1,28 +1,37 @@
# Logs
logs
*.log
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
# testing
/coverage
# next.js
/.next/
/out/
# production
/build
# misc
.DS_Store
*.pem
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Dependency directories
node_modules
# local env files
.env.local
.env.development.local
.env.test.local
.env.production.local
# Dotenv environment variable files
.env
# vercel
.vercel
# Gatsby files
.cache
public
# Mac files
.DS_Store
# Yarn
yarn-error.log
.yarn-integrity
# Local Netlify folder
.netlify
# Dev metadata file
*.temp.json
# typescript
*.tsbuildinfo

4
.husky/commit-msg Executable file
View File

@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
yarn commitlint --edit $1

5
.husky/pre-commit Executable file
View File

@@ -0,0 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
yarn lint-staged
yarn pretty-quick --staged

3
.lintstagedrc.json Normal file
View File

@@ -0,0 +1,3 @@
{
"*.{js,jsx,ts,tsx}": "eslint --fix"
}

1
.nvmrc Normal file
View File

@@ -0,0 +1 @@
lts/*

8
.prettierrc.json Normal file
View File

@@ -0,0 +1,8 @@
{
"trailingComma": "none",
"tabWidth": 2,
"semi": false,
"singleQuote": true,
"arrowParens": "avoid",
"printWidth": 100
}

23
.renovaterc.json Normal file
View File

@@ -0,0 +1,23 @@
{
"extends": ["config:base", ":disableDependencyDashboard"],
"labels": ["dependencies"],
"semanticCommits": "enabled",
"rangeStrategy": "replace",
"rebaseLabel": "rebase",
"rebaseWhen": "auto",
"packageRules": [
{
"updateTypes": ["minor", "patch", "pin", "digest"],
"automerge": true
},
{
"depTypeList": ["devDependencies"],
"automerge": true
}
],
"lockFileMaintenance": {
"enabled": true,
"automerge": true
},
"schedule": ["before 10am on the first day of the month"]
}

View File

@@ -1,95 +0,0 @@
# Change Log
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [0.2.4](https://github.com/marscollective/gatsby-themes/compare/@marscollective/gatsby-starter-link-free@0.2.1...@marscollective/gatsby-starter-link-free@0.2.4) (2020-12-15)
**Note:** Version bump only for package @marscollective/gatsby-starter-link-free
## [0.2.3](https://github.com/marscollective/gatsby-themes/compare/@marscollective/gatsby-starter-link-free@0.2.1...@marscollective/gatsby-starter-link-free@0.2.3) (2020-12-15)
**Note:** Version bump only for package @marscollective/gatsby-starter-link-free
## [0.2.2](https://github.com/marscollective/gatsby-themes/compare/@marscollective/gatsby-starter-link-free@0.2.1...@marscollective/gatsby-starter-link-free@0.2.2) (2020-12-15)
**Note:** Version bump only for package @marscollective/gatsby-starter-link-free
## [0.2.1](https://github.com/marscollective/gatsby-theme-jdoe/compare/@marscollective/gatsby-starter-link-free@0.2.0...@marscollective/gatsby-starter-link-free@0.2.1) (2020-12-15)
**Note:** Version bump only for package @marscollective/gatsby-starter-link-free
# [0.2.0](https://github.com/marscollective/gatsby-theme-jdoe/compare/@marscollective/gatsby-starter-link-free@0.1.0...@marscollective/gatsby-starter-link-free@0.2.0) (2020-12-14)
### Bug Fixes
* 🐛 Data import ([#34](https://github.com/marscollective/gatsby-theme-jdoe/issues/34)) ([5b3c7ed](https://github.com/marscollective/gatsby-theme-jdoe/commit/5b3c7eda09079aa827642d01594c280b7225bb3e))
# [0.1.0](https://github.com/marscollective/gatsby-theme-jdoe/compare/@marscollective/gatsby-starter-link-free@0.0.7...@marscollective/gatsby-starter-link-free@0.1.0) (2020-12-14)
**Note:** Version bump only for package @marscollective/gatsby-starter-link-free
## [0.0.7](https://github.com/marscollective/gatsby-theme-jdoe/compare/@marscollective/gatsby-starter-link-free@0.0.6...@marscollective/gatsby-starter-link-free@0.0.7) (2020-12-13)
### Bug Fixes
* **deps:** pin dependencies ([#27](https://github.com/marscollective/gatsby-theme-jdoe/issues/27)) ([d640f09](https://github.com/marscollective/gatsby-theme-jdoe/commit/d640f097df149d53a1f8254cff7b7593836bbd03))
* **deps:** update react monorepo to v17 ([#28](https://github.com/marscollective/gatsby-theme-jdoe/issues/28)) ([ffa7173](https://github.com/marscollective/gatsby-theme-jdoe/commit/ffa71730f668b79d9f0d9edb559ab1619ee22af0))
## [0.0.5](https://github.com/marscollective/gatsby-theme-jdoe/compare/@marscollective/gatsby-starter-link-free@0.0.4...@marscollective/gatsby-starter-link-free@0.0.5) (2020-12-12)
**Note:** Version bump only for package @marscollective/gatsby-starter-link-free
## [0.0.4](https://github.com/marscollective/gatsby-theme-jdoe/compare/@marscollective/gatsby-starter-link-free@0.0.3...@marscollective/gatsby-starter-link-free@0.0.4) (2020-12-12)
**Note:** Version bump only for package @marscollective/gatsby-starter-link-free
## [0.0.3](https://github.com/marscollective/gatsby-theme-jdoe/compare/@marscollective/gatsby-starter-link-free@0.0.2...@marscollective/gatsby-starter-link-free@0.0.3) (2020-12-12)
**Note:** Version bump only for package @marscollective/gatsby-starter-link-free
## 0.0.2 (2020-12-12)
**Note:** Version bump only for package @marscollective/gatsby-starter-link-free

21
LICENSE Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2021 Daniel Soares
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -1,41 +0,0 @@
# Gatsby Theme Link Free
[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/marscollective/link-free&stack=cms)
Link Free is an open-source alternative to paid, limited tools like [Linktree](https://linktr.ee/).
![Link Free interface](content/link-free.png)
It is developed by [Mars](https://marscollective.co/) using the Jamstack architecture, combining the power of Gatsby (React and GraphQL) with Tailwind CSS and Netlify CMS to provide a fast, reliable, and fully customizable tool, _served_ by the Netlify CDN. 🚀
You can see it in action by visiting [our Link Free page](https://links.marscollective.co/) 🌎, and while you're at it, go have a look at our social networks. 😉
## Why use it?
Social networks like Instagram and TikTok do not provide support for clickable links on post captions. To circumvent this limitation, tools like Linktree appeared, providing users the ability to use their profile URL field to direct viewers to multiple destinations.
While these tools are simple by design, we consider them to be more expensive and less customizable than they should. Using Linktree as an example, the free version doesn't even provide a proper color customization option, and even the paid version doesn't allow you to serve your page using a custom domain.
## Available features
Other than creating a link list, currently, you can:
- Add a custom logo;
- Add a custom favicon;
- Integrate Google Analytics or Google Tag Manager with just an ID;
- Freely customize buttons, background, and font colors;
- Customize the button's border-radius (make it square or rounder).
You can also live preview all your changes while you work on them.
## Deploying your Link Free
Just click the "Netlify" button at the top of this README. Yup, that's it. 😄
You just have to follow the instructions and you'll have a copy of our repository, with even our links so you can get used to the admin panel.
## License and contributions
This project is open source and you're free to fork and remix it to fit your needs.
If there's any feature you'd like to see implemented, we'd love to see your feedback on our [issues page](https://github.com/marscollective/link-free/issues). While we can't promise to develop every request, we're happy to accept community contributions.

View File

@@ -1,6 +0,0 @@
---
key: '404'
title: '404:'
message: It looks like you're lost...
buttonLabel: Go back home 🏠
---

Binary file not shown.

Before

Width:  |  Height:  |  Size: 123 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 401 KiB

View File

@@ -1,14 +0,0 @@
---
key: links
data:
- label: Chat with us on WhatsApp 💬
url: https://wa.me/5545991328593
- label: Follow us on Instagram 📸
url: https://instagram.com/mars.collective
- label: See our portfolio on Behance 🎨
url: https://www.behance.net/marscollective
- label: See what we're coding on Github 🧑‍💻
url: https://github.com/marscollective
- label: Like us on Facebook 👍
url: https://www.facebook.com/marscollective.co
---

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -1,16 +0,0 @@
title: Link free
shortTitle: Link free
siteUrl: https://themes.marscollective.co/link-free
description: ''
lang: en
logo: logo.png
favicon: favicon.png
rounded: '16'
colors:
DEFAULT: '#FAFAFA'
highlight: '#00d1b7'
accent: '#262626'
background: '#262626'
tracking:
which: none
id: ''

View File

@@ -1 +0,0 @@
module.exports = { plugins: [`@marscollective/gatsby-theme-link-free`] }

View File

@@ -1,6 +0,0 @@
[build]
publish = "public"
command = "yarn build"
[[plugins]]
package = "netlify-plugin-gatsby-cache"

5
next-env.d.ts vendored Normal file
View File

@@ -0,0 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.

7
next.config.js Normal file
View File

@@ -0,0 +1,7 @@
/** @type {import('next').NextConfig} */
module.exports = {
reactStrictMode: true,
eslint: {
dirs: ['./src/**/*']
}
}

View File

@@ -1,29 +1,38 @@
{
"name": "@marscollective/gatsby-starter-link-free",
"version": "0.2.4",
"name": "link-free",
"author": "Daniel Soares <daniel.soares@me.com>",
"version": "1.0.0",
"private": true,
"license": "MIT",
"scripts": {
"build": "GATSBY_EXPERIMENTAL_PAGE_BUILD_ON_DATA_CHANGES=true gatsby build --log-pages",
"dev": "gatsby develop",
"serve": "gatsby serve",
"clean": "gatsby clean",
"deploy": "yarn build && netlify deploy -p",
"format": "prettier --write \"**/*.{js,jsx,ts,tsx,json,md,mdx,yaml,yml}\""
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint --fix",
"prepare": "husky install",
"clean": "rm -rf node_modules .next data public",
"type-check": "tsc"
},
"dependencies": {
"@marscollective/gatsby-theme-link-free": "^0.2.7",
"gatsby": "2.32.11",
"@stitches/react": "^1.2.6",
"next": "12.0.7",
"react": "17.0.2",
"react-dom": "17.0.2"
},
"devDependencies": {
"prettier": "2.2.1"
},
"prettier": {
"trailingComma": "none",
"tabWidth": 2,
"semi": false,
"singleQuote": true,
"arrowParens": "avoid"
"@commitlint/cli": "15.0.0",
"@commitlint/config-conventional": "15.0.0",
"@types/node": "16.11.12",
"@types/react": "17.0.37",
"eslint": "8.4.1",
"eslint-config-next": "12.0.7",
"eslint-config-prettier": "8.3.0",
"eslint-plugin-prettier": "4.0.0",
"eslint-plugin-simple-import-sort": "7.0.0",
"husky": "7.0.4",
"lint-staged": "12.1.2",
"prettier": "2.5.0",
"pretty-quick": "3.1.2",
"typescript": "4.5.3"
}
}
}

5
src/pages/_app.tsx Normal file
View File

@@ -0,0 +1,5 @@
import type { AppProps } from 'next/app'
export default function App({ Component, pageProps }: AppProps) {
return <Component {...pageProps} />
}

19
src/pages/_document.tsx Normal file
View File

@@ -0,0 +1,19 @@
import NextDocument, { Head, Html, Main, NextScript } from 'next/document'
import { getCssText } from '../styles/stitches.config'
export default class Document extends NextDocument {
render() {
return (
<Html>
<Head>
<style id="stitches" dangerouslySetInnerHTML={{ __html: getCssText() }} />
</Head>
<body>
<Main />
<NextScript />
</body>
</Html>
)
}
}

7
src/pages/index.tsx Normal file
View File

@@ -0,0 +1,7 @@
export default function Home() {
return (
<div>
<h1>Hello</h1>
</div>
)
}

9
src/styles/globals.ts Normal file
View File

@@ -0,0 +1,9 @@
import { globalCss } from './stitches.config'
export const globalStyles = globalCss({
'*': {
margin: 0,
padding: 0,
boxSizing: 'border-box'
}
})

View File

@@ -0,0 +1,5 @@
import { createStitches } from '@stitches/react'
export const { css, styled, globalCss, theme, keyframes, getCssText } = createStitches({
theme: {}
})

20
tsconfig.json Normal file
View File

@@ -0,0 +1,20 @@
{
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
}

16648
yarn.lock

File diff suppressed because it is too large Load Diff