Skip to content
This repository was archived by the owner on Sep 26, 2023. It is now read-only.

Commit 627d2ad

Browse files
author
Nguyen Thai Vinh
committed
prepare version 1.0.0
0 parents  commit 627d2ad

File tree

95 files changed

+29880
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+29880
-0
lines changed

Diff for: .editorconfig

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# EditorConfig helps developers define and maintain consistent
2+
# coding styles between different editors and IDEs
3+
# editorconfig.org
4+
5+
root = true
6+
7+
8+
[*]
9+
10+
# Change these settings to your own preference
11+
indent_style = space
12+
indent_size = 2
13+
14+
# We recommend you to keep these unchanged
15+
end_of_line = lf
16+
charset = utf-8
17+
trim_trailing_whitespace = true
18+
insert_final_newline = true
19+
20+
[*.md]
21+
trim_trailing_whitespace = false
22+
23+
[*.json]
24+
indent_size = 2
25+
26+
[*.{html,js,md}]
27+
block_comment_start = /**
28+
block_comment = *
29+
block_comment_end = */

Diff for: .eslintrc.js

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
module.exports = {
2+
root: true,
3+
parser: '@typescript-eslint/parser',
4+
plugins: ['@typescript-eslint', 'import', 'html'],
5+
extends: [
6+
'eslint:recommended',
7+
'plugin:@typescript-eslint/eslint-recommended',
8+
'plugin:@typescript-eslint/recommended',
9+
'plugin:import/errors',
10+
'plugin:import/warnings',
11+
],
12+
rules: {
13+
// disable the rule for all files
14+
'@typescript-eslint/explicit-function-return-type': 'off',
15+
'@typescript-eslint/no-non-null-assertion': 'off',
16+
'import/named': 'off',
17+
'import/no-unresolved': 'off',
18+
},
19+
env: {
20+
browser: true,
21+
node: true,
22+
},
23+
};

Diff for: .gitignore

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
## editors
2+
/.idea
3+
/.vscode
4+
5+
## system files
6+
.DS_Store
7+
8+
## npm
9+
/node_modules/
10+
/npm-debug.log
11+
12+
## testing
13+
/coverage/
14+
15+
## temp folders
16+
/.tmp/
17+
18+
# build
19+
/_site/
20+
/dist/
21+
/out-tsc/

Diff for: .npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
registry=https://registry.npmjs.com

Diff for: .storybook/main.js

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
module.exports = {
2+
stories: ['../stories/**/*.{js,md,mdx}'],
3+
addons: [
4+
'storybook-prebuilt/addon-actions/register.js',
5+
'storybook-prebuilt/addon-knobs/register.js',
6+
'storybook-prebuilt/addon-docs/register.js',
7+
'storybook-prebuilt/addon-viewport/register.js',
8+
],
9+
esDevServer: {
10+
// custom es-dev-server options
11+
nodeResolve: true,
12+
watch: true,
13+
open: true,
14+
},
15+
};

Diff for: .storybook/preview-head.html

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<script src="./assets/highlight.pack.js" lang="javascript"></script>

Diff for: .storybook/preview.js

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { addParameters, setCustomElements } from '@open-wc/demoing-storybook';
2+
3+
addParameters({
4+
docs: {
5+
iframeHeight: '500px',
6+
},
7+
});
8+
9+
async function run() {
10+
const customElements = await (
11+
await fetch(new URL('../custom-elements.json', import.meta.url))
12+
).json();
13+
14+
setCustomElements(customElements);
15+
}
16+
17+
run();

Diff for: LICENSE

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

Diff for: README.md

+95
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# \<dashboard-layout>
2+
3+
This webcomponent follows the [open-wc](https://github.com/open-wc/open-wc) recommendation.
4+
5+
## Installation
6+
7+
```bash
8+
npm i @cff/dashboard-layout
9+
```
10+
11+
## Usage
12+
13+
```html
14+
<script type="module">
15+
import '@cff/dashboard-layout/dashboard-layout.js';
16+
</script>
17+
18+
<cff-dashboard-layout></cff-dashboard-layout>
19+
```
20+
21+
## Linting with ESLint, Prettier, and Types
22+
23+
To scan the project for linting errors, run
24+
25+
```bash
26+
npm run lint
27+
```
28+
29+
You can lint with ESLint and Prettier individually as well
30+
31+
```bash
32+
npm run lint:eslint
33+
```
34+
35+
```bash
36+
npm run lint:prettier
37+
```
38+
39+
To automatically fix many linting errors, run
40+
41+
```bash
42+
npm run format
43+
```
44+
45+
You can format using ESLint and Prettier individually as well
46+
47+
```bash
48+
npm run format:eslint
49+
```
50+
51+
```bash
52+
npm run format:prettier
53+
```
54+
55+
## Testing with Karma
56+
57+
To run the suite of karma tests, run
58+
59+
```bash
60+
npm run test
61+
```
62+
63+
To run the tests in watch mode (for <abbr title="test driven development">TDD</abbr>, for example), run
64+
65+
```bash
66+
npm run test:watch
67+
```
68+
69+
## Demoing with Storybook
70+
71+
To run a local instance of Storybook for your component, run
72+
73+
```bash
74+
npm run storybook
75+
```
76+
77+
To build a production version of Storybook, run
78+
79+
```bash
80+
npm run storybook:build
81+
```
82+
83+
## Tooling configs
84+
85+
For most of the tools, the configuration is in the `package.json` to reduce the amount of files in your project.
86+
87+
If you customize the configuration a lot, you can consider moving them to individual files.
88+
89+
## Local Demo with `es-dev-server`
90+
91+
```bash
92+
npm start
93+
```
94+
95+
To run a local development server that serves the basic demo located in `demo/index.html`

Diff for: assets/fonts/RedHatDisplay-Black.ttf

76.1 KB
Binary file not shown.

Diff for: assets/fonts/RedHatDisplay-BlackItalic.ttf

77.8 KB
Binary file not shown.

Diff for: assets/fonts/RedHatDisplay-Bold.ttf

74.7 KB
Binary file not shown.

Diff for: assets/fonts/RedHatDisplay-BoldItalic.ttf

76.2 KB
Binary file not shown.

Diff for: assets/fonts/RedHatDisplay-Italic.ttf

74.6 KB
Binary file not shown.

Diff for: assets/fonts/RedHatDisplay-Medium.ttf

73.7 KB
Binary file not shown.

Diff for: assets/fonts/RedHatDisplay-MediumItalic.ttf

75.3 KB
Binary file not shown.

Diff for: assets/fonts/RedHatDisplay-Regular.ttf

73.2 KB
Binary file not shown.

Diff for: assets/fonts/RedHatText-Bold.ttf

74.2 KB
Binary file not shown.

Diff for: assets/fonts/RedHatText-BoldItalic.ttf

74.8 KB
Binary file not shown.

Diff for: assets/fonts/RedHatText-Italic.ttf

74.5 KB
Binary file not shown.

Diff for: assets/fonts/RedHatText-Medium.ttf

73.7 KB
Binary file not shown.

Diff for: assets/fonts/RedHatText-MediumItalic.ttf

73.9 KB
Binary file not shown.

Diff for: assets/fonts/RedHatText-Regular.ttf

71 KB
Binary file not shown.

0 commit comments

Comments
 (0)