Skip to content

Commit

Permalink
feat: finished setting up important bits of the initial repo iteration
Browse files Browse the repository at this point in the history
  • Loading branch information
vantaboard committed Oct 7, 2021
1 parent 37fac25 commit 450d61a
Show file tree
Hide file tree
Showing 34 changed files with 11,157 additions and 372 deletions.
73 changes: 73 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
module.exports = {
root: true,
env: {
node: true,
es6: true,
},
parserOptions: { ecmaVersion: 8, sourceType: 'module' },
ignorePatterns: ['node_modules/*'],
extends: ['eslint:recommended'],
overrides: [
{
files: ['**/*.ts', '**/*.tsx'],
parser: '@typescript-eslint/parser',
settings: {
react: { version: 'detect' },
'import/resolver': {
typescript: {},
},
},
env: {
browser: true,
node: true,
es6: true,
},
extends: [
'eslint:recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
'plugin:react-hooks/recommended',
'plugin:jsx-a11y/recommended',
'plugin:prettier/recommended',
],
rules: {
'no-restricted-imports': [
'error',
{
patterns: ['@/features/*/*'],
},
],
'linebreak-style': ['error', 'unix'],
'react/prop-types': 'off',

'import/order': [
'error',
{
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'object'],
'newlines-between': 'always',
alphabetize: { order: 'asc', caseInsensitive: true },
},
],
'import/default': 'off',
'import/no-named-as-default-member': 'off',
'import/no-named-as-default': 'off',

'react/react-in-jsx-scope': 'off',

'jsx-a11y/anchor-is-valid': 'off',

'@typescript-eslint/no-unused-vars': ['error'],

'@typescript-eslint/explicit-function-return-type': ['off'],
'@typescript-eslint/explicit-module-boundary-types': ['off'],
'@typescript-eslint/no-empty-function': ['off'],
'@typescript-eslint/no-explicit-any': ['off'],

'prettier/prettier': ['error', {}, { usePrettierrc: true }],
},
},
],
};
1 change: 1 addition & 0 deletions .github/images/icons/npm/.ref
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://static.npmjs.com/b0f1a8318363185cc2ea6a40ac23eeb2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions .github/images/icons/reakit/.ref
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://reakit.io/favicon-32x32.png
Binary file added .github/images/icons/reakit/favicon-32x32.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions .github/images/icons/storybook/.ref
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://storybook.js.org/images/logos/icon-storybook.png
Binary file added .github/images/icons/storybook/icon-storybook.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions .github/images/icons/style-dictionary/.ref
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://amzn.github.io/style-dictionary/assets/favicon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions .github/images/icons/styled-components/.ref
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://styled-components.com/nav-logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions .github/images/icons/typescript/.ref
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://www.typescriptlang.org/favicon.ico
Binary file added .github/images/icons/typescript/favicon.ico
Binary file not shown.
1 change: 1 addition & 0 deletions .github/images/icons/yarn/.ref
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://yarnpkg.com/icons/icon-48x48.png
Binary file added .github/images/icons/yarn/icon-48x48.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions .github/issue_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Expected Behavior

Please describe the behavior you are expecting

# Current Behavior

What is the current behavior?

# Failure Information (for bugs)

Please help provide information about the failure if this is a bug. If it is not a bug, please remove the rest of this template.

## Steps to Reproduce

Please provide detailed steps for reproducing the issue.

1. step 1
2. step 2
3. you get it...

## Failure Logs

Please include any relevant log snippets or files here.
24 changes: 24 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

## Type of change

Please delete options that are not relevant.

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update

# Checklist:

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules
13 changes: 13 additions & 0 deletions .github/scripts/update_icons.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Push-Location ../images/icons
$dirs = Get-ChildItem | ForEach-Object $_ { $_.Name }

$dirs | ForEach-Object $_ {
Push-Location $_

$uri = Get-Content .ref -TotalCount 1
wget -N $uri

Pop-Location
}

Pop-Location
25 changes: 25 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Release
on:
push:
branches:
- main
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 'lts/*'
- name: Install dependencies
run: yarn ci
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,17 @@
# Node
node_modules

# Typescript build files
/dist/

# Environmental variables
.env

# Log files
*.log

# Storybook
storybook-static

# Style dictionary
/src/style-dictionary-dist
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx pretty-quick --staged
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"singleQuote": true,
"trailingComma": "es5",
"printWidth": 100,
"tabWidth": 2,
"useTabs": false
}
43 changes: 43 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"branches": ["main"],
"plugins": [
["@semantic-release/commit-analyzer", {
"preset": "angular",
"parserOpts": {
"noteKeywords": ["BREAKING CHANGE", "BREAKING CHANGES", "BREAKING"]
},
"releaseRules": [
{"type": "docs", "scope": "README", "release": "patch"},
{"type": "refactor", "scope": "core-*", "release": "minor"},
{"type": "refactor", "release": "patch"},
{"scope": "no-release", "release": false}
]
}],
["@semantic-release/release-notes-generator", {
"preset": "angular",
"parserOpts": {
"noteKeywords": ["BREAKING CHANGE", "BREAKING CHANGES", "BREAKING"]
},
"writerOpts": {
"commitsSort": ["subject", "scope"]
}
}],
[
"@semantic-release/changelog",
{
"changelogFile": "docs/CHANGELOG.md"
}
],
"@semantic-release/github",
["@semantic-release/npm", {
"npmPublish": false
}],
[
"@semantic-release/git",
{
"assets": ["dist/**/*.{js,css}", "docs", "package.json", "docs/CHANGELOG.md"],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
]
]
}
15 changes: 15 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');

module.exports = {
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
addons: ['@storybook/addon-links', '@storybook/addon-essentials'],
webpackFinal: (config) => {
config.resolve.plugins = [
...(config.resolve.plugins || []),
new TsconfigPathsPlugin({
extensions: config.resolve.extensions,
}),
];
return config;
},
};
14 changes: 14 additions & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { addDecorator } from '@storybook/react';

export const parameters = {
actions: { argTypesRegex: '^on[A-Z].*' },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
};

// styled-components Global Style will go here
addDecorator((story) => <>{story()}</>);
7 changes: 7 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Copyright (c) 2021 Brighten Clark

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.
58 changes: 58 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Mag UI

## πŸ‘  Features

- Accessible due to Reakit
- Full color palette
- Light theme / dark theme
- Style dictionary
- Neat animations

## πŸ”§ Install

[npm <img src=".github/images/icons/npm/b0f1a8318363185cc2ea6a40ac23eeb2.png" alt="npm" height="10"/>](https://github.com/npm/cli):

```shell
# Clone repo
$ git clone https://github.com/blackboardd/magui.git
$ cd magui

# Install dependencies
$ npm install

# Start dev server
$ npm start
```

[yarn <img src=".github/images/icons/yarn/icon-48x48.png" alt="yarn" height="10"/>](https://github.com/yarnpkg/yarn):

```shell
# Clone repo
$ git clone https://github.com/blackboardd/magui.git
$ cd magui

# Install dependencies
$ yarn install

# Start dev server
$ yarn start
```

## 🧱 Stack

- [polished ✨](https://polished.js.org/docs/)
- [Reakit <img src=".github/images/icons/reakit/favicon-32x32.png" alt="Reakit" height="10"/>](https://reakit.io/docs/get-started/)
- [Storybook <img src=".github/images/icons/storybook/icon-storybook.png" alt="Storybook" height="10"/>](https://github.com/storybookjs/storybook)
- [Style Dictionary <img src=".github/images/icons/style-dictionary/favicon.png" alt="Style Dictioanry" height="10"/>](https://amzn.github.io/style-dictionary/#/)
- [styled-components <img src=".github/images/icons/styled-components/nav-logo.png" alt="styled-components" height="10"/>](https://github.com/styled-components/styled-components)
- [TypeScript <img src=".github/images/icons/typescript/favicon.ico" alt="TypeScript" height="10"/>](https://github.com/microsoft/TypeScript)

### πŸ§‘β€πŸ€β€πŸ§‘ Contributing

To contribute to this project, make a pull request to <https://github.com/blackboardd/magui>.

### βš–οΈ License

This project uses the [MIT license](https://opensource.org/licenses/MIT).

Copyright (c) 2021 Brighten Clark
11 changes: 11 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Mag UI

πŸ’„ A component library developed with Reakit and TypeScript.

<em>[TODO.md spec & Kanban Board](https://bit.ly/3fCwKfM)</em>

### Todo

### In Progress

### Done βœ“

0 comments on commit 450d61a

Please sign in to comment.