Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into daisyUi
Browse files Browse the repository at this point in the history
  • Loading branch information
remadex committed Sep 10, 2024
2 parents 619c489 + 6c52595 commit 9c55439
Show file tree
Hide file tree
Showing 77 changed files with 14,545 additions and 12,824 deletions.
Binary file modified .DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/blueprints/*/files/

# compiled output
/declarations/
/dist/

# misc
Expand Down
5 changes: 4 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ module.exports = {
parser: 'ember-eslint-parser',
plugins: ['ember'],
extends: ['eslint:recommended', 'plugin:ember/recommended', 'plugin:ember/recommended-gts'],
rules: {
'no-unused-vars': 'off',
'no-undef': 'off',
}
},
// node files
{
Expand All @@ -57,7 +61,6 @@ module.exports = {
'./.stylelintrc.{js,cjs}',
'./.template-lintrc.{js,cjs}',
'./ember-cli-build.js',
'./playwright.config.ts',
'./testem.js',
'./tailwind.config.js',
'./blueprints/*/index.js',
Expand Down
22 changes: 1 addition & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: wyvox/action-setup-pnpm@v3
with:
node-version: 20
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Tests
run: pnpm test
60 changes: 60 additions & 0 deletions .husky/_/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#!/bin/sh

if [ "$LEFTHOOK_VERBOSE" = "1" -o "$LEFTHOOK_VERBOSE" = "true" ]; then
set -x
fi

if [ "$LEFTHOOK" = "0" ]; then
exit 0
fi

call_lefthook()
{
if test -n "$LEFTHOOK_BIN"
then
"$LEFTHOOK_BIN" "$@"
elif lefthook -h >/dev/null 2>&1
then
lefthook "$@"
else
dir="$(git rev-parse --show-toplevel)"
osArch=$(uname | tr '[:upper:]' '[:lower:]')
cpuArch=$(uname -m | sed 's/aarch64/arm64/;s/x86_64/x64/')
if test -f "$dir/node_modules/lefthook-${osArch}-${cpuArch}/bin/lefthook"
then
"$dir/node_modules/lefthook-${osArch}-${cpuArch}/bin/lefthook" "$@"
elif test -f "$dir/node_modules/@evilmartians/lefthook/bin/lefthook-${osArch}-${cpuArch}/lefthook"
then
"$dir/node_modules/@evilmartians/lefthook/bin/lefthook-${osArch}-${cpuArch}/lefthook" "$@"
elif test -f "$dir/node_modules/@evilmartians/lefthook-installer/bin/lefthook"
then
"$dir/node_modules/@evilmartians/lefthook-installer/bin/lefthook" "$@"
elif test -f "$dir/node_modules/lefthook/bin/index.js"
then
"$dir/node_modules/lefthook/bin/index.js" "$@"

elif bundle exec lefthook -h >/dev/null 2>&1
then
bundle exec lefthook "$@"
elif yarn lefthook -h >/dev/null 2>&1
then
yarn lefthook "$@"
elif pnpm lefthook -h >/dev/null 2>&1
then
pnpm lefthook "$@"
elif swift package plugin lefthook >/dev/null 2>&1
then
swift package --disable-sandbox plugin lefthook "$@"
elif command -v mint >/dev/null 2>&1
then
mint run csjones/lefthook-plugin "$@"
elif command -v npx >/dev/null 2>&1
then
npx lefthook "$@"
else
echo "Can't find lefthook in PATH"
fi
fi
}

call_lefthook run "pre-push" "$@"
60 changes: 60 additions & 0 deletions .husky/_/prepare-commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#!/bin/sh

if [ "$LEFTHOOK_VERBOSE" = "1" -o "$LEFTHOOK_VERBOSE" = "true" ]; then
set -x
fi

if [ "$LEFTHOOK" = "0" ]; then
exit 0
fi

call_lefthook()
{
if test -n "$LEFTHOOK_BIN"
then
"$LEFTHOOK_BIN" "$@"
elif lefthook -h >/dev/null 2>&1
then
lefthook "$@"
else
dir="$(git rev-parse --show-toplevel)"
osArch=$(uname | tr '[:upper:]' '[:lower:]')
cpuArch=$(uname -m | sed 's/aarch64/arm64/;s/x86_64/x64/')
if test -f "$dir/node_modules/lefthook-${osArch}-${cpuArch}/bin/lefthook"
then
"$dir/node_modules/lefthook-${osArch}-${cpuArch}/bin/lefthook" "$@"
elif test -f "$dir/node_modules/@evilmartians/lefthook/bin/lefthook-${osArch}-${cpuArch}/lefthook"
then
"$dir/node_modules/@evilmartians/lefthook/bin/lefthook-${osArch}-${cpuArch}/lefthook" "$@"
elif test -f "$dir/node_modules/@evilmartians/lefthook-installer/bin/lefthook"
then
"$dir/node_modules/@evilmartians/lefthook-installer/bin/lefthook" "$@"
elif test -f "$dir/node_modules/lefthook/bin/index.js"
then
"$dir/node_modules/lefthook/bin/index.js" "$@"

elif bundle exec lefthook -h >/dev/null 2>&1
then
bundle exec lefthook "$@"
elif yarn lefthook -h >/dev/null 2>&1
then
yarn lefthook "$@"
elif pnpm lefthook -h >/dev/null 2>&1
then
pnpm lefthook "$@"
elif swift package plugin lefthook >/dev/null 2>&1
then
swift package --disable-sandbox plugin lefthook "$@"
elif command -v mint >/dev/null 2>&1
then
mint run csjones/lefthook-plugin "$@"
elif command -v npx >/dev/null 2>&1
then
npx lefthook "$@"
else
echo "Can't find lefthook in PATH"
fi
fi
}

call_lefthook run "prepare-commit-msg" "$@"
7 changes: 0 additions & 7 deletions .husky/pre-commit

This file was deleted.

1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
auto-install-peers=false
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"recommendations": ["typed-ember.glint-vscode","ms-playwright.playwright","dbaeumer.vscode-eslint","bradlc.vscode-tailwindcss","lifeart.vscode-ember-unstable","redhat.vscode-yaml","mikestead.dotenv","esbenp.prettier-vscode"]
"recommendations": ["typed-ember.glint-vscode","dbaeumer.vscode-eslint","bradlc.vscode-tailwindcss","lifeart.vscode-ember-unstable","redhat.vscode-yaml","mikestead.dotenv","esbenp.prettier-vscode"]
}
47 changes: 19 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,50 +1,47 @@
# ember-boilerplate
# Ember-boilerplate

[![Tests](https://github.com/TRIPTYK/ember-boilerplate/actions/workflows/ci.yml/badge.svg)](https://github.com/TRIPTYK/ember-boilerplate/actions/workflows/ci.yml)

## You can use this IF

- ✅ You use tailwindcss
- ✅ You use typescript
- ✅ You use JWT based authentification
- ✅ You use pnpm
- ✅ You don't bother using TRIPTYK packages
<p>
<a href="https://emberjs.com" target="_blank" rel="noopener noreferrer">
<img width="180" src="https://emberjs.com/images/brand/ember-tomster-lockup-4c.svg" alt="Ember logo">
</a>
<a href="https://triptyk.eu" target="_blank" rel="noopener noreferrer">
<img width="160" src="https://triptyk.eu/assets/images/tpk-square-logo.svg" alt="TRIPTYK logo">
</a>
</p>

## Preconfigured 5.x Ember project with

### Ember Side

- Embroider
- Typescript integration (ember-cli-typescript)
- Validations (ember-immer-changeset + yup)
- Tailwindcss 3.x, with primary and secondary colors configured
- Flash messages (ember-cli-flash)
- Tests (ember-test-selectors, ember-cli-page-object, playwright)
- Tests (ember-test-selectors, ember-cli-page-object)
- Sessions,Login,Logout,... (ember-simple-auth,ember-simple-auth-token)
- Base ember adapter, serializer and controller
- Ember data next gen (RequestManager based)
- Ember concurrency
- Test seeding & parallelization (ember-exam)
- dev & test mocking (msw)
- e2e testing (playwright)
- Translations (ember-intl)
- Authorizations (ember-can)
- Pre-made registration flow (login/register/forgot-password)

### VSCODE IDE
## VSCODE IDE

- VSCODE Ready, all rules are setup for a great developing experience.

### Additional Tooling
## Additional Tooling

- With-backend: `with-backend.js` Starts the ember app with a backend synchronously.
- Code duplication: with jscpd.
- Husky: checks linting + code duplication + integration & unit tests before commiting to VSC.

### Docker
## Docker

- A docker image can be found in `images`.

### CI
## CI

A github workflow CI is provided.

Expand Down Expand Up @@ -86,7 +83,7 @@ Components are located: `app/components/`.

### API Mocking

Development mocks are in `public/mocks`.
Development mocks are in `app/handlers`.
Testing mocks are split in the `tests` folders.

## Installation
Expand All @@ -99,9 +96,8 @@ Testing mocks are split in the `tests` folders.

## Running / Development

- `ember serve`
- `pnpm start`
- Visit your app at [http://localhost:4200](http://localhost:4200).
- Visit your tests at [http://localhost:4200/tests](http://localhost:4200/tests).

### Running Tests

Expand All @@ -112,12 +108,7 @@ Testing mocks are split in the `tests` folders.
- `pnpm lint`
- `pnpm lint:fix`

### Duplication

- `pnpm test:duplication`


### Building

- `ember build` (development)
- `ember build --environment production` (production)
- `pnpm build --mode=dev` (development)
- `pnpm build` (production)
72 changes: 0 additions & 72 deletions app/adapters/application.ts

This file was deleted.

25 changes: 0 additions & 25 deletions app/adapters/user.ts

This file was deleted.

Loading

0 comments on commit 9c55439

Please sign in to comment.