0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00

feat(console): init (#239)

* feat(console): init

* refactor: remove unused tsconfig props

* fix: lint error
This commit is contained in:
Gao Sun 2022-02-16 15:04:34 +08:00 committed by GitHub
parent e206dfcecb
commit 5ce8c18652
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 1659 additions and 10 deletions

View file

@ -22,6 +22,9 @@ jobs:
- name: Lint - name: Lint
run: pnpm -- lerna run --parallel lint run: pnpm -- lerna run --parallel lint
- name: Style Lint
run: pnpm -- lerna run --parallel stylelint
- name: Test - name: Test
run: pnpm -- lerna run --parallel test:coverage run: pnpm -- lerna run --parallel test:coverage

1
.gitignore vendored
View file

@ -11,6 +11,7 @@ node_modules
# production # production
/packages/*/build /packages/*/build
/packages/*/lib /packages/*/lib
/packages/*/dist
# logs # logs
logs logs

3
.npmrc Normal file
View file

@ -0,0 +1,3 @@
# Hoist for Parcel
public-hoist-pattern[]=@parcel/*
public-hoist-pattern[]=postcss

View file

@ -0,0 +1,3 @@
# @logto/console
The web admin console for Logto.

View file

@ -0,0 +1,46 @@
{
"name": "@logto/console",
"version": "0.1.0",
"description": "> TODO: description",
"author": "Gao Sun <gao@silverhand.io>",
"homepage": "https://github.com/logto-io/logto#readme",
"license": "MPL-2.0",
"scripts": {
"preinstall": "npx only-allow pnpm",
"precommit": "lint-staged",
"start": "parcel src/index.html",
"check": "tsc --noEmit",
"build": "pnpm check && rm -rf dist && parcel build src/index.html --no-autoinstall",
"lint": "eslint --ext .ts --ext .tsx src",
"stylelint": "stylelint \"src/**/*.scss\""
},
"dependencies": {
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
"devDependencies": {
"@parcel/core": "^2.3.1",
"@parcel/transformer-sass": "^2.3.1",
"@silverhand/eslint-config": "^0.8.0",
"@silverhand/eslint-config-react": "^0.8.0",
"@silverhand/ts-config": "^0.8.0",
"@silverhand/ts-config-react": "^0.8.0",
"@types/react": "^17.0.14",
"@types/react-dom": "^17.0.9",
"eslint": "^8.1.0",
"lint-staged": "^11.1.1",
"parcel": "^2.3.1",
"postcss": "^8.4.6",
"postcss-modules": "^4.3.0",
"prettier": "^2.3.2",
"stylelint": "^13.13.1",
"typescript": "^4.3.5"
},
"eslintConfig": {
"extends": "@silverhand/react"
},
"stylelint": {
"extends": "@silverhand/eslint-config-react/.stylelintrc"
},
"prettier": "@silverhand/eslint-config/.prettierrc"
}

View file

@ -0,0 +1,3 @@
.app {
color: #aaa;
}

View file

@ -0,0 +1,7 @@
import React from 'react';
import * as styles from './App.module.scss';
export const App = () => {
return <h1 className={styles.app}>Hello world!</h1>;
};

View file

@ -0,0 +1,65 @@
// Copied from react-scripts/lib/react-app.d.ts
declare module '*.avif' {
const src: string;
export default src;
}
declare module '*.bmp' {
const src: string;
export default src;
}
declare module '*.gif' {
const src: string;
export default src;
}
declare module '*.jpg' {
const src: string;
export default src;
}
declare module '*.jpeg' {
const src: string;
export default src;
}
declare module '*.png' {
const src: string;
export default src;
}
declare module '*.webp' {
const src: string;
export default src;
}
declare module '*.svg' {
import * as React from 'react';
export const ReactComponent: React.FunctionComponent<
React.SVGProps<SVGSVGElement> & { title?: string }
>;
const src: string;
export default src;
}
declare module '*.module.css' {
const classes: Readonly<Record<string, string>>;
export default classes;
export = classes;
}
declare module '*.module.scss' {
const classes: Readonly<Record<string, string>>;
export default classes;
export = classes;
}
declare module '*.module.sass' {
const classes: Readonly<Record<string, string>>;
export default classes;
export = classes;
}

View file

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Logto Console</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="index.tsx"></script>
</body>
</html>

View file

@ -0,0 +1,7 @@
import React from 'react';
import ReactDOM from 'react-dom';
import { App } from './App';
const app = document.querySelector('#app');
ReactDOM.render(<App />, app);

View file

@ -0,0 +1,6 @@
{
"extends": "@silverhand/ts-config-react/tsconfig.base",
"include": [
"src"
]
}

File diff suppressed because it is too large Load diff