Skip to content

Commit 007405a

Browse files
committed
configuring CI for new libraries, various tweaks, README
1 parent c76583e commit 007405a

Some content is hidden

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

49 files changed

+1745
-454
lines changed

.github/build-packages.php

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
3+
$dir = __DIR__.'/../src/LiveComponent';
4+
$flags = JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE;
5+
6+
$json = ltrim(file_get_contents($dir.'/composer.json'));
7+
if (null === $package = json_decode($json)) {
8+
passthru("composer validate $dir/composer.json");
9+
exit(1);
10+
}
11+
12+
$package->repositories[] = [
13+
'type' => 'path',
14+
'url' => '../TwigComponent',
15+
];
16+
17+
$json = preg_replace('/\n "repositories": \[\n.*?\n \],/s', '', $json);
18+
$json = rtrim(json_encode(['repositories' => $package->repositories], $flags), "\n}").','.substr($json, 1);
19+
$json = preg_replace('/"symfony\/ux-twig-component": "(\^[\d]+\.[\d]+)"/s', '"symfony/ux-twig-component": "@dev"', $json);
20+
file_put_contents($dir.'/composer.json', $json);
21+

.github/workflows/test.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,17 @@ jobs:
5454
cd src/LazyImage
5555
composer update --prefer-lowest --prefer-dist --no-interaction --no-ansi --no-progress
5656
php vendor/bin/simple-phpunit
57+
- name: TwigComponent
58+
run: |
59+
cd src/TwigComponent
60+
composer update --prefer-lowest --prefer-dist --no-interaction --no-ansi --no-progress
61+
php vendor/bin/simple-phpunit
62+
- name: LiveComponent
63+
run: |
64+
cd src/LiveComponent
65+
php ../../.github/build-packages.php
66+
composer update --prefer-lowest --prefer-dist --no-interaction --no-ansi --no-progress
67+
php vendor/bin/simple-phpunit
5768
5869
tests-php-high-deps:
5970
runs-on: ubuntu-latest
@@ -86,10 +97,31 @@ jobs:
8697
composer config platform.php 7.4.99
8798
composer update --prefer-dist --no-interaction --no-ansi --no-progress
8899
php vendor/bin/simple-phpunit
100+
- name: TwigComponent
101+
run: |
102+
cd src/TwigComponent
103+
composer config platform.php 7.4.99
104+
composer update --prefer-dist --no-interaction --no-ansi --no-progress
105+
php vendor/bin/simple-phpunit
106+
- name: LiveComponent
107+
run: |
108+
cd src/LiveComponent
109+
php ../../.github/build-packages.php
110+
composer config platform.php 7.4.99
111+
composer update --prefer-dist --no-interaction --no-ansi --no-progress
112+
php vendor/bin/simple-phpunit
89113
90114
tests-js:
91115
runs-on: ubuntu-latest
92116
steps:
93117
- uses: actions/checkout@master
94118
- run: yarn
95119
- run: yarn test
120+
121+
- name: Verify dist files are up to date
122+
run: |
123+
if [ -z "$(git status --porcelain)" ]; then
124+
exit 0
125+
else
126+
exit 1
127+
fi

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ integrating it into [Webpack Encore](https://github.com/symfony/webpack-encore).
3434
Improve image loading performances through lazy-loading and data-uri thumbnails
3535
- [UX Swup](https://github.com/symfony/ux-swup):
3636
[Swup](https://swup.js.org/) page transition library integration for Symfony
37+
- [Twig Component](https://github.com/symfony/ux-twig-component):
38+
A system to build reusable "components" with Twig
39+
- [Live Component](https://github.com/symfony/ux-live-component):
40+
Gives Twig Components a URL and a JavaScript library to automatically re-render via Ajax as your user interacts with it
3741

3842
## Stimulus Tools around the World
3943

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"private": true,
33
"workspaces": [
4-
"src/**/Resources/assets"
4+
"src/**/Resources/assets",
5+
"src/**/assets"
56
],
67
"scripts": {
78
"build": "yarn workspaces run build",

src/LiveComponent/.github/workflows/ci.yml

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

src/LiveComponent/LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2004-2021 Fabien Potencier
3+
Copyright (c) 2021 Fabien Potencier
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)