Skip to content

Commit

Permalink
Merge pull request #32 from sensasi-delight:sensasi-delight/issue29
Browse files Browse the repository at this point in the history
chore: add code linter for consistency
  • Loading branch information
sensasi-delight authored Jun 26, 2024
2 parents 083fda8 + bdae1b7 commit b63f8d7
Show file tree
Hide file tree
Showing 70 changed files with 2,616 additions and 572 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/lint-build-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Lint and build check

on: [push]

jobs:
npm-lint:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install NPM dependencies
run: npm ci

- name: Lint check
run: npm run lint

pint-lint:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
php: [8.3]

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: json, dom, curl, libxml, mbstring
coverage: none

- name: Install Pint
run: composer global require laravel/pint

- name: Run Pint
run: pint --test

npm-build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install NPM dependencies
run: npm ci

- name: Build check
run: npm run build
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/src/assets/dist
16 changes: 13 additions & 3 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,18 @@
{
"arrowParens": "avoid",
"jsxBracketSameLine": true,
"bracketSameLine": true,
"semi": false,
"singleQuote": true,
"tabWidth": 4,
"trailingComma": "all"
}
"trailingComma": "all",
"plugins": ["@shufo/prettier-plugin-blade"],
"overrides": [
{
"files": ["*.blade.php"],
"options": {
"parser": "blade",
"tabWidth": 4
}
}
]
}
110 changes: 52 additions & 58 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,48 +26,47 @@ This package is still under development, please contribute to make it release fa

### Components

- [x] App bar: Top
- [x] Banner
- [x] Button
- [x] Basic Button
- [x] Floating Action Button
- [x] Icon Button
- [x] Card
- [x] Checkbox
- [x] Chip
- [x] Data table
- [ ] Dialog
- [x] Icon
- [ ] Image list
- [ ] List
- [ ] Menu
- [ ] Navigation drawer
- [x] Progress indicator
- [x] Linear Progress
- [x] Circular Progress
- [ ] Radio button
- [ ] Slider
- [x] Snackbar
- [x] Switch
- [x] Tab Bar
- [ ] Text field
- [x] Tooltip
- [x] Typography

- [x] App bar: Top
- [x] Banner
- [x] Button
- [x] Basic Button
- [x] Floating Action Button
- [x] Icon Button
- [x] Card
- [x] Checkbox
- [x] Chip
- [x] Data table
- [ ] Dialog
- [x] Icon
- [ ] Image list
- [ ] List
- [ ] Menu
- [ ] Navigation drawer
- [x] Progress indicator
- [x] Linear Progress
- [x] Circular Progress
- [ ] Radio button
- [ ] Slider
- [x] Snackbar
- [x] Switch
- [x] Tab Bar
- [ ] Text field
- [x] Tooltip
- [x] Typography

### Unsupported Components

The implementation of these components below are not supported by default for Material Design Web.

- App bar: bottom
- Backdrop
- Bottom navigation
- Date picker
- Divider
- Navigation rail
- Sheet: bottom
- Sheet: side
- Time picker
- App bar: bottom
- Backdrop
- Bottom navigation
- Date picker
- Divider
- Navigation rail
- Sheet: bottom
- Sheet: side
- Time picker

## Installation

Expand All @@ -92,27 +91,22 @@ After Material Blade has installed on your Laravel project, you have to [registe
Next step, you must includes once the `<x-MaterialBlade::_assets />` inside `<head>` on your `view`. That's it‼, now you can use the Material Blade components on your `view`🎉. Your `view` should look like code below.

```html
<!DOCTYPE html>
<!doctype html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Material Blade Example</title>

<!-- Material Blade required assets -->
<x-MaterialBlade::_assets />

</head>

<body>

<!-- this is Material Blade component -->
<x-MaterialBlade::button label="This is a Button" />

</body>

<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Material Blade Example</title>

<!-- Material Blade required assets -->
<x-MaterialBlade::_assets />
</head>

<body>
<!-- this is Material Blade component -->
<x-MaterialBlade::button label="This is a Button" />
</body>
</html>
```

Expand All @@ -136,4 +130,4 @@ The code is released under the MIT license.

Email - [[email protected]](mailto:[email protected]?subject=[GitHub]%20MaterialBlade)

Twitter - [@sensasi_DELIGHT](https://twitter.com/sensasi_DELIGHT)
Twitter - [@sensasi_DELIGHT](https://twitter.com/sensasi_DELIGHT)
9 changes: 8 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,18 @@
"illuminate/view": "^8|^9|^10|^11",
"php": "^8.1"
},
"scripts": {
"lint": "pint --test",
"lint:fix": "pint"
},
"extra": {
"laravel": {
"providers": [
"MaterialBlade\\ServiceProvider"
]
}
},
"require-dev": {
"laravel/pint": "^1.16"
}
}
}
Loading

0 comments on commit b63f8d7

Please sign in to comment.