Skip to content

Commit 9cfb19b

Browse files
committed
[Router] Initialize the component
1 parent 52dc225 commit 9cfb19b

24 files changed

+714
-0
lines changed

src/Router/.gitattributes

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/.gitattributes export-ignore
2+
/.gitignore export-ignore
3+
/.symfony.bundle.yaml export-ignore
4+
/phpunit.xml.dist export-ignore
5+
/assets/src export-ignore
6+
/assets/test export-ignore
7+
/tests export-ignore

src/Router/.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
vendor
2+
composer.lock
3+
.php_cs.cache
4+
.phpunit.result.cache

src/Router/.symfony.bundle.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
branches: ["2.x"]
2+
maintained_branches: ["2.x"]
3+
doc_dir: "doc"

src/Router/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# CHANGELOG
2+
3+
## [Unreleased]
4+
5+
- Create the component.

src/Router/LICENSE

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) 2023-present Fabien Potencier
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is furnished
8+
to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19+
THE SOFTWARE.

src/Router/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Symfony UX Router
2+
3+
**EXPERIMENTAL** This component is currently experimental and is
4+
likely to change, or even change drastically.
5+
6+
Symfony UX Router integrates [Symfony Router](https://symfony.com/doc/current/routing.html) for JavaScript.
7+
8+
**This repository is a READ-ONLY sub-tree split**. See
9+
https://github.com/symfony/ux to create issues or submit pull requests.
10+
11+
## Resources
12+
13+
- [Documentation](https://symfony.com/bundles/ux-router/current/index.html)
14+
- [Report issues](https://github.com/symfony/ux/issues) and
15+
[send Pull Requests](https://github.com/symfony/ux/pulls)
16+
in the [main Symfony UX repository](https://github.com/symfony/ux)

src/Router/assets/package.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"name": "@symfony/ux-router",
3+
"description": "Symfony Router for JavaScript",
4+
"license": "MIT",
5+
"version": "1.0.0",
6+
"main": "dist/router_controller.js",
7+
"types": "dist/router_controller.d.ts",
8+
"symfony": {
9+
"importmap": {
10+
"intl-messageformat": "^10.2.5",
11+
"@symfony/ux-router": "path:%PACKAGE%/dist/router_controller.js",
12+
"@app/routes": "path:var/routes/index.js",
13+
"@app/routes/configuration": "path:var/routes/configuration.js"
14+
}
15+
}
16+
}

src/Router/assets/src/router.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/*
2+
* This file is part of the Symfony package.
3+
*
4+
* (c) Fabien Potencier <[email protected]>
5+
*
6+
* For the full copyright and license information, please view the LICENSE
7+
* file that was distributed with this source code.
8+
*/
9+
10+
'use strict';
11+
12+
// TODO
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/*
2+
* This file is part of the Symfony package.
3+
*
4+
* (c) Fabien Potencier <[email protected]>
5+
*
6+
* For the full copyright and license information, please view the LICENSE
7+
* file that was distributed with this source code.
8+
*/
9+
10+
'use strict';
11+
12+
export * from './router';

src/Router/composer.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"name": "symfony/ux-router",
3+
"type": "symfony-bundle",
4+
"description": "Exposes Symfony Routes directly to JavaScript.",
5+
"keywords": [
6+
"symfony-ux"
7+
],
8+
"homepage": "https://symfony.com",
9+
"license": "MIT",
10+
"authors": [
11+
{
12+
"name": "Hugo Alliaume",
13+
"email": "[email protected]"
14+
},
15+
{
16+
"name": "Symfony Community",
17+
"homepage": "https://symfony.com/contributors"
18+
}
19+
],
20+
"autoload": {
21+
"psr-4": {
22+
"Symfony\\UX\\Router\\": "src/"
23+
}
24+
},
25+
"autoload-dev": {
26+
"psr-4": {
27+
"Symfony\\UX\\Router\\Tests\\": "tests/"
28+
}
29+
},
30+
"require": {
31+
"php": ">=8.1",
32+
"symfony/console": "^5.4|^6.0|^7.0",
33+
"symfony/filesystem": "^5.4|^6.0|^7.0",
34+
"symfony/string": "^5.4|^6.0|^7.0",
35+
},
36+
"require-dev": {
37+
"symfony/framework-bundle": "^5.4|^6.0|^7.0",
38+
"symfony/phpunit-bridge": "^5.2|^6.0|^7.0",
39+
"symfony/var-dumper": "^5.4|^6.0|^7.0"
40+
},
41+
"extra": {
42+
"thanks": {
43+
"name": "symfony/ux",
44+
"url": "https://github.com/symfony/ux"
45+
}
46+
},
47+
"minimum-stability": "dev"
48+
}

0 commit comments

Comments
 (0)