Skip to content

Commit

Permalink
svelte wip
Browse files Browse the repository at this point in the history
working

make clean

test

bypass

ci

node version
  • Loading branch information
pjaudiomv committed Jun 13, 2024
1 parent 06675de commit 9b1b677
Show file tree
Hide file tree
Showing 69 changed files with 7,087 additions and 13,536 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ jobs:
make npm
- name: make lint-js 🧹
env:
LARAVEL_BYPASS_ENV_CHECK: '1'
run: |
make lint-js
Expand Down Expand Up @@ -110,10 +112,10 @@ jobs:
run: |
make composer
- name: setup node 16 ❇️
- name: setup node 20 ❇️
uses: actions/setup-node@v4.0.2
with:
node-version: 16
node-version: 20

- name: make frontend 🐥
run: |
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ jobs:
make npm
- name: make lint-js 🧹
env:
LARAVEL_BYPASS_ENV_CHECK: '1'
run: |
make lint-js
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ terraform.tfvars
build
docker/docker-compose.dev.yml
.vscode
.svelte-kit
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ ifeq ($(CI)x, x)
IMAGE := rootserver
TAG := local
COMPOSER_ARGS :=
NPM_FLAG := install
COMPOSER_PREFIX := docker run --pull=always -t --rm -v '$(shell pwd)':/code -w /code $(BASE_IMAGE):$(BASE_IMAGE_TAG)
LINT_PREFIX := docker run -t --rm -v '$(shell pwd)':/code -w /code/src $(IMAGE):$(TAG)
TEST_PREFIX := docker run -e XDEBUG_MODE=coverage,debug -t --rm -v '$(shell pwd)/src:/var/www/html/main_server' -v '$(shell pwd)/docker/test-auto-config.inc.php:/var/www/html/auto-config.inc.php' -w /var/www/html/main_server --network host $(IMAGE):$(TAG)
Expand All @@ -31,6 +32,7 @@ else
TAG := unstable
endif
COMPOSER_ARGS := --classmap-authoritative
NPM_FLAG := ci
ifeq ($(DEV)x, x)
COMPOSER_ARGS := $(COMPOSER_ARGS) --no-dev
endif
Expand All @@ -55,7 +57,7 @@ $(CROUTON_JS):
rm -rf src/public/client_interface/html/croutonjs/examples

$(NODE_MODULES):
cd src && npm install
cd src && npm $(NPM_FLAG)

$(FRONTEND): $(NODE_MODULES)
cd src && npm run build
Expand Down Expand Up @@ -141,7 +143,7 @@ lint-fix: ## PHP Lint Fix

.PHONY: lint-js
lint-js: ## JavaScript Lint
cd src && npm run lint
cd src && npm run lint && npm run check

.PHONY: phpstan
phpstan: ## PHP Larastan Code Analysis
Expand All @@ -166,5 +168,6 @@ clean: ## Clean build
rm -rf src/public/local_server
rm -rf src/public/semantic
rm -rf src/node_modules
rm -rf src/.svelte-kit
rm -rf src/vendor
rm -rf build
4 changes: 1 addition & 3 deletions docker/docker-compose.dev.yml.example
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
version: '3'

services:
bmlt:
environment:
GKEY: ''
NEW_UI_ENABLED: 'false'
NEW_UI_ENABLED: 'false'
2 changes: 0 additions & 2 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3'

services:
bmlt:
build:
Expand Down
2 changes: 1 addition & 1 deletion src/.nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.18.0
20.13.1
25 changes: 12 additions & 13 deletions src/.prettierrc
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
{
"jsxSingleQuote": true,
"singleQuote": true,
"semi": true,
"tabWidth": 2,
"trailingComma": "all",
"printWidth": 140,
"bracketSameLine": false,
"useTabs": false,
"arrowParens": "always",
"endOfLine": "auto",
"importOrder": ["^components/(.*)$", "^[./]"],
"importOrderSeparation": true,
"importOrderSortSpecifiers": true
"jsxSingleQuote": true,
"singleQuote": true,
"semi": true,
"tabWidth": 2,
"bracketSameLine": false,
"useTabs": false,
"arrowParens": "always",
"endOfLine": "auto",
"trailingComma": "none",
"printWidth": 200,
"plugins": ["prettier-plugin-svelte"],
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
}
14 changes: 14 additions & 0 deletions src/app.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css" crossorigin="anonymous" referrerpolicy="no-referrer" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
%sveltekit.head%
</head>
<body data-sveltekit-preload-data="hover">
<div style="display: contents">%sveltekit.body%</div>
</body>
</html>

33 changes: 33 additions & 0 deletions src/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import js from '@eslint/js';
import ts from 'typescript-eslint';
import svelte from 'eslint-plugin-svelte';
import prettier from 'eslint-config-prettier';
import globals from 'globals';

/** @type {import('eslint').Linter.FlatConfig[]} */
export default [
js.configs.recommended,
...ts.configs.recommended,
...svelte.configs['flat/recommended'],
prettier,
...svelte.configs['flat/prettier'],
{
languageOptions: {
globals: {
...globals.browser,
...globals.node
}
}
},
{
files: ['**/*.svelte'],
languageOptions: {
parserOptions: {
parser: ts.parser
}
}
},
{
ignores: ['build/', '.svelte-kit/', 'dist/', '*.md']
}
];
Loading

0 comments on commit 9b1b677

Please sign in to comment.