Skip to content

Commit e502c95

Browse files
authored
Setup melos and restore READMEs (#14)
* ngast: rename export files Signed-off-by: Gavin Zhao <[email protected]> * Restore READMEs Signed-off-by: Gavin Zhao <[email protected]> * Update .gitignore Signed-off-by: Gavin Zhao <[email protected]> * Commit pubspec_overrides files Signed-off-by: Gavin Zhao <[email protected]> * Update mono_repo Signed-off-by: Gavin Zhao <[email protected]>
1 parent 1d0ffe9 commit e502c95

Some content is hidden

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

55 files changed

+617
-241
lines changed

.github/workflows/dart.yml

+150-149
Large diffs are not rendered by default.

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@ pubspec.lock
1010
# Files generated by dart tools.
1111
**/.dart_tool/
1212
**/doc/api/
13+
14+
# melos
15+
# pubspec_overrides.yaml

.idea/.name

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/modules.xml

+16
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations/melos_bootstrap.xml

+11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations/melos_clean.xml

+11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

_tests/melos__tests.iml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module type="WEB_MODULE" version="4">
3+
<component name="NewModuleRootManager" inherit-compiler-output="true">
4+
<exclude-output />
5+
<content url="file://$MODULE_DIR$">
6+
<sourceFolder url="file://$MODULE_DIR$" isTestSource="false" />
7+
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
8+
<excludeFolder url="file://$MODULE_DIR$/.dart_tool" />
9+
<excludeFolder url="file://$MODULE_DIR$/.pub" />
10+
<excludeFolder url="file://$MODULE_DIR$/build" />
11+
</content>
12+
<orderEntry type="sourceFolder" forTests="false" />
13+
<orderEntry type="library" name="Dart SDK" level="project" />
14+
<orderEntry type="library" name="Dart Packages" level="project" />
15+
</component>
16+
</module>

_tests/pubspec.yaml

+16-17
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
name: _tests
22
description: Tests for AngularDart.
3+
publish_to: none
34
environment:
45
sdk: '>=2.17.0 <3.0.0'
56

67
dependencies:
78
# No strict dependencies, we always use dependency_overrides.
89
ngdart:
910
ngtest:
11+
ngforms:
1012

1113
# Actual valid dependencies required.
1214
build_resolvers: ^2.0.0
@@ -15,9 +17,6 @@ dependencies:
1517
test: ^1.16.0
1618

1719
dev_dependencies:
18-
# No strict dependencies, we always use dependency_overrides.
19-
ngforms:
20-
2120
# Actual valid dependencies required.
2221
analyzer: ^4.0.0
2322
build_runner: ^2.0.0
@@ -30,17 +29,17 @@ dev_dependencies:
3029
term_glyph: ^1.2.0
3130

3231
# DO NOT REMOVE. We don't publish this package, it is just for testing.
33-
dependency_overrides:
34-
ngdart:
35-
path: ../ngdart
36-
ngast:
37-
path: ../ngast
38-
ngcompiler:
39-
path: ../ngcompiler
40-
ngforms:
41-
path: ../ngforms
42-
ngrouter:
43-
path: ../ngrouter
44-
ngtest:
45-
path: ../ngtest
46-
analyzer: ^4.0.0
32+
# dependency_overrides:
33+
# ngdart:
34+
# path: ../ngdart
35+
# ngast:
36+
# path: ../ngast
37+
# ngcompiler:
38+
# path: ../ngcompiler
39+
# ngforms:
40+
# path: ../ngforms
41+
# ngrouter:
42+
# path: ../ngrouter
43+
# ngtest:
44+
# path: ../ngtest
45+
# analyzer: ^4.0.0

_tests/pubspec_overrides.yaml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# melos_managed_dependency_overrides: ngast,ngcompiler,ngdart,ngforms,ngtest
2+
dependency_overrides:
3+
ngast:
4+
path: ../ngast
5+
ngcompiler:
6+
path: ../ngcompiler
7+
ngdart:
8+
path: ../ngdart
9+
ngforms:
10+
path: ../ngforms
11+
ngtest:
12+
path: ../ngtest
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module type="WEB_MODULE" version="4">
3+
<component name="NewModuleRootManager" inherit-compiler-output="true">
4+
<exclude-output />
5+
<content url="file://$MODULE_DIR$">
6+
<sourceFolder url="file://$MODULE_DIR$" isTestSource="false" />
7+
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
8+
<excludeFolder url="file://$MODULE_DIR$/.dart_tool" />
9+
<excludeFolder url="file://$MODULE_DIR$/.pub" />
10+
<excludeFolder url="file://$MODULE_DIR$/build" />
11+
</content>
12+
<orderEntry type="sourceFolder" forTests="false" />
13+
<orderEntry type="library" name="Dart SDK" level="project" />
14+
<orderEntry type="library" name="Dart Packages" level="project" />
15+
</component>
16+
</module>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# melos_managed_dependency_overrides: ngdart,ngast,ngcompiler
2+
dependency_overrides:
3+
ngdart:
4+
path: ../../ngdart
5+
ngast:
6+
path: ../../ngast
7+
ngcompiler:
8+
path: ../../ngcompiler

melos.yaml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: angular
2+
repository: https://github.com/angulardart-community/angular
3+
4+
packages:
5+
- "**"
6+
# - ngast
7+
# - ngcompiler
8+
# - ngdart
9+
# - ngforms
10+
# - ngrouter
11+
# - ngtest
12+
13+
ignore:
14+
# - _tests
15+
- examples
16+
- goldens
17+
- tests
18+
19+
command:
20+
bootstrap:
21+
usePubspecOverrides: true

melos_angular.iml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module type="WEB_MODULE" version="4">
3+
<component name="NewModuleRootManager" inherit-compiler-output="true">
4+
<exclude-output />
5+
<content url="file://$MODULE_DIR$">
6+
<sourceFolder url="file://$MODULE_DIR$" isTestSource="false" />
7+
</content>
8+
<orderEntry type="sourceFolder" forTests="false" />
9+
<orderEntry type="library" name="Dart SDK" level="project" />
10+
<orderEntry type="library" name="Dart Packages" level="project" />
11+
</component>
12+
</module>

ngast/README.md

+67-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,67 @@
1-
See https://github.com/angulardart-community for current updates on this project.
1+
# ngast
2+
3+
<!-- Badges -->
4+
5+
[![Pub Package](https://img.shields.io/pub/v/ngast.svg)](https://pub.dartlang.org/packages/ngast)
6+
[![Build Status](https://img.shields.io/github/workflow/status/angulardart-community/angular/Dart%20CI)](https://github.com/angulardart-community/angular/actions/workflows/dart.yml)
7+
[![Gitter](https://img.shields.io/gitter/room/angulardart/community)](https://gitter.im/angulardart/community)
8+
9+
Parser and utilities for [AngularDart][gh_angular_dart] templates.
10+
11+
[gh_angular_dart]: https://github.com/angulardart-community/angular
12+
13+
## Usage
14+
15+
*Currently in development* and **not stable**.
16+
17+
```dart
18+
import 'package:ngast/ngast.dart';
19+
20+
main() {
21+
// Create an AST tree by parsing an AngularDart template.
22+
var tree = parse('<button [title]="someTitle">Hello</button>');
23+
24+
// Print to console.
25+
print(tree);
26+
27+
// Output:
28+
// [
29+
// ElementAst <button> {
30+
// properties=
31+
// PropertyAst {
32+
// title="ExpressionAst {someTitle}"}
33+
// childNodes=TextAst {Hello}
34+
// }
35+
// }
36+
// ]
37+
}
38+
```
39+
40+
Additional flags can be passed to change the behavior of the parser:
41+
42+
| Data type | Name | Description | Default Value |
43+
|------------|------------|--------------|---------------|
44+
| `String` | _sourceUrl_ | String describing the path of the HTML string. | |
45+
| `bool` | _desugar_ | Enabled desugaring of banana-syntax, star syntax, and pipes. | true |
46+
| `bool` | _parseExpressions_ | Parses Dart expressions raises exceptions if occurred. | true |
47+
| `ExceptionHandler` | _exceptionHandler_ | Switch to 'new RecoveringExceptionHandler()' to enable error recovery. | ThrowingExceptionHandler |
48+
49+
When using RecoveringExceptionHandler, the accumulated exceptions can be
50+
accessed through the RecoveringExceptionHandler object. Refer to the following
51+
example:
52+
53+
```dart
54+
void parse(String content, String sourceUrl) {
55+
var exceptionHandler = new RecoveringExceptionHandler();
56+
var asts = parse(
57+
content,
58+
sourceUrl: sourceUrl,
59+
desugar: false,
60+
parseExpressions: false,
61+
exceptionHandler: exceptionHandler,
62+
);
63+
for (AngularParserException e in exceptionHandler.exceptions) {
64+
// Do something with exception.
65+
}
66+
}
67+
```
File renamed without changes.

ngast/melos_ngast.iml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<module type="WEB_MODULE" version="4">
3+
<component name="NewModuleRootManager" inherit-compiler-output="true">
4+
<exclude-output />
5+
<content url="file://$MODULE_DIR$">
6+
<sourceFolder url="file://$MODULE_DIR$" isTestSource="false" />
7+
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
8+
<excludeFolder url="file://$MODULE_DIR$/.dart_tool" />
9+
<excludeFolder url="file://$MODULE_DIR$/.pub" />
10+
<excludeFolder url="file://$MODULE_DIR$/build" />
11+
</content>
12+
<orderEntry type="sourceFolder" forTests="false" />
13+
<orderEntry type="library" name="Dart SDK" level="project" />
14+
<orderEntry type="library" name="Dart Packages" level="project" />
15+
</component>
16+
</module>

ngast/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: ngast
22
repository: https://github.com/angulardart-community/angular
33
description: Parser and utilities for AngularDart templates
4-
version: 2.2.0
4+
version: 2.1.2
55

66
environment:
77
sdk: '>=2.17.0 <3.0.0'

ngast/test/ast_cli_tester.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import 'dart:io';
22

33
import 'package:path/path.dart' as p;
4-
import 'package:ngast/angular_ast.dart';
4+
import 'package:ngast/ngast.dart';
55

66
RecoveringExceptionHandler exceptionHandler = RecoveringExceptionHandler();
77

ngast/test/cli_tester.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import 'dart:convert';
22
import 'dart:io';
33

4-
import 'package:ngast/angular_ast.dart';
4+
import 'package:ngast/ngast.dart';
55

66
RecoveringExceptionHandler exceptionHandler = RecoveringExceptionHandler();
77
Iterable<NgToken> tokenize(String html) {

ngast/test/e2e/e2e_template_tests.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import 'dart:io';
22

33
import 'package:path/path.dart' as p;
44
import 'package:test/test.dart';
5-
import 'package:ngast/angular_ast.dart';
5+
import 'package:ngast/ngast.dart';
66

77
void main() {
88
var parse = const NgParser().parse;

ngast/test/expression/micro/parser_test.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import 'package:test/test.dart';
2-
import 'package:ngast/angular_ast.dart';
2+
import 'package:ngast/ngast.dart';
33
import 'package:ngast/src/expression/micro/ast.dart';
44
import 'package:ngast/src/expression/micro/parser.dart';
55

ngast/test/lexer_test.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import 'package:test/test.dart';
2-
import 'package:ngast/angular_ast.dart';
2+
import 'package:ngast/ngast.dart';
33

44
void main() {
55
// Returns the html parsed as a series of tokens.

ngast/test/parser_test.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import 'package:test/test.dart';
2-
import 'package:ngast/angular_ast.dart';
2+
import 'package:ngast/ngast.dart';
33

44
void main() {
55
List<StandaloneTemplateAst> parse(String template) {

ngast/test/random_generator_test/random_tester.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import 'dart:io';
33
import 'dart:math';
44

55
import 'package:path/path.dart' as p;
6-
import 'package:ngast/angular_ast.dart';
6+
import 'package:ngast/ngast.dart';
77
import 'package:ngast/src/token/tokens.dart';
88

99
final int generationCount = 10000;

ngast/test/recover_errors_lexer_test.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import 'package:test/test.dart';
2-
import 'package:ngast/angular_ast.dart';
2+
import 'package:ngast/ngast.dart';
33
import 'package:ngast/src/parser/reader.dart';
44
import 'package:ngast/src/scanner.dart';
55
import 'package:ngast/src/token/tokens.dart';

ngast/test/recover_errors_parser_test.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import 'package:test/test.dart';
2-
import 'package:ngast/angular_ast.dart';
2+
import 'package:ngast/ngast.dart';
33

44
final recoveringExceptionHandler = RecoveringExceptionHandler();
55

ngast/test/visitor_test.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import 'package:test/test.dart';
2-
import 'package:ngast/angular_ast.dart';
2+
import 'package:ngast/ngast.dart';
33

44
void main() {
55
// DesugarVisitor is tested by parser_test.dart

ngast/test/whitespace_test.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import 'package:ngast/angular_ast.dart';
1+
import 'package:ngast/ngast.dart';
22
import 'package:test/test.dart';
33

44
void main() {

ngcompiler/README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
Tooling for compiling [AngularDart](https://pub.dev/packages/angular).
1+
[![Pub Package](https://img.shields.io/pub/v/ngcompiler.svg)](https://pub.dev/packages/ngcompiler)
2+
[![Build Status](https://img.shields.io/github/workflow/status/angulardart-community/angular/Dart%20CI)](https://github.com/angulardart-community/angular/actions/workflows/dart.yml)
3+
[![Gitter](https://img.shields.io/gitter/room/angulardart/community)](https://gitter.im/angulardart/community)
24

3-
See https://github.com/angulardart-community for current updates on this project.
5+
Tooling for compiling [AngularDart](https://pub.dev/packages/angular).

ngcompiler/lib/v1/src/compiler/ast_directive_normalizer.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import 'package:ngdart/src/meta.dart';
2-
import 'package:ngast/angular_ast.dart' as ast;
2+
import 'package:ngast/ngast.dart' as ast;
33
import 'package:ngcompiler/v1/angular_compiler.dart';
44
import 'package:ngcompiler/v1/cli.dart';
55
import 'package:ngcompiler/v2/context.dart';

0 commit comments

Comments
 (0)