Skip to content

Commit 8da3649

Browse files
committed
Testing : replace webpack encore -> asset mapper
1 parent 61dc799 commit 8da3649

29 files changed

+95
-8378
lines changed

.eslintrc.js

Lines changed: 0 additions & 25 deletions
This file was deleted.

.github/workflows/install.yaml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,8 @@ jobs:
5757
bin/console doctrine:schema:create
5858
bin/console doctrine:fixtures:load --no-interaction
5959
php bin/console d:s:v --skip-sync
60-
## —— Yarn ————————————————————————————————————————————————————————————
61-
- name: Yarn install / build
62-
uses: actions/setup-node@v2
63-
with:
64-
node-version: '20'
65-
- run: |
66-
yarn install
67-
yarn encore production
60+
## —— Asset mapper ————————————————————————————————————————————————————————————
61+
- name: import asset
62+
run: |
63+
bin/console importmap:install
64+
bin/console asset-map:compile

.gitignore

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,7 @@ composer.lock
2727
.phpunit.result.cache
2828
###< phpunit/phpunit ###
2929

30-
###> symfony/webpack-encore-bundle ###
31-
/node_modules/
32-
npm-debug.log
33-
###< symfony/webpack-encore-bundle ###
34-
35-
###> yarn ###
36-
yarn-error.log
37-
/.pnp.cjs
38-
/.pnp.loader.mjs
39-
/.yarn/*
40-
!/.yarn/releases
41-
!/.yarn/plugins
42-
###< yarn ###
30+
###> symfony/asset-mapper ###
31+
/public/assets/
32+
/assets/vendor/
33+
###< symfony/asset-mapper ###

.yarn/releases/yarn-4.7.0.cjs

Lines changed: 0 additions & 935 deletions
This file was deleted.

.yarnrc.yml

Lines changed: 0 additions & 2 deletions
This file was deleted.

Makefile

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,22 @@ help: ## Outputs this help screen
88
@grep -E '(^[a-zA-Z0-9_-]+:.*?##.*$$)|(^##)' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}{printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}' | sed -e 's/\[32m##/[33m/'
99

1010
## —— Coding standards ——————————————————————————————————————————————————————
11-
analyse: ## Analyse PHP
11+
analyse-php: ## Analyse PHP
1212
$(PHPSTAN) analyse
1313

1414
fix-php: ## Fix files with php-cs-fixer
1515
$(PHP_CS_FIXER) fix
1616

17-
fix-js: ## Fix files with eslint
18-
$(YARN) lint-fix
19-
20-
fix-all: fix-php fix-js ## Fix all files
21-
2217
## —— Tests ——————————————————————————————————————————————————————
2318
test: ## Test app
2419
$(PHPUNIT)
2520

26-
check: fix-all analyse test
21+
check: fix-php analyse-php test
2722

2823
## —— docker-composer ——————————————————————————————————————————————————————
2924
dc-sh:
3025
docker-compose exec symfony bash
3126

32-
3327
dc-up:
3428
docker-compose up -d
3529

README.md

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,8 @@ docker compose exec web bin/console doctrine:schema:update --force
3737

3838
# load fixtures
3939
docker compose exec web bin/console doctrine:fixtures:load -n
40-
```
4140

42-
App url : http://localhost
43-
44-
# Build assets
45-
46-
### Requirements
47-
- node 20 or higher
48-
- yarn
49-
50-
```bash
5141
# install assets
52-
yarn install
53-
54-
# build assets in prod mode
55-
yarn build
42+
docker compose exec web bin/console importmap:install
43+
docker compose exec web bin/console asset-map:compile
5644
```

assets/admin/main.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

assets/app.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
import './styles/app.css'
2+
import './highlightCode.js'
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import highlightJs from 'highlight.js/lib/core'
1+
import 'highlight.js/styles/atom-one-dark-reasonable.css';
2+
import highlightJs from 'highlight.js/lib/core';
23

34
import yaml from 'highlight.js/lib/languages/yaml';
45
highlightJs.registerLanguage('yaml', yaml);

0 commit comments

Comments
 (0)