Update jael3_web
This commit is contained in:
parent
ca8e85e60c
commit
1e7446af51
9 changed files with 46 additions and 45 deletions
|
@ -1,21 +1,29 @@
|
|||
MIT License
|
||||
BSD 3-Clause License
|
||||
|
||||
Copyright (c) 2017 The Angel Framework
|
||||
Copyright (c) 2021, dukefirehawk.com
|
||||
All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
# jael_web
|
||||
# JAEL3 Web
|
||||
|
||||
[![Pub](https://img.shields.io/pub/v/jael_web.svg)](https://pub.dartlang.org/packages/jael_web)
|
||||
[![build status](https://travis-ci.org/angel-dart/jael_web.svg)](https://travis-ci.org/angel-dart/jael)
|
||||
|
||||
Experimental virtual DOM/SPA engine built on Jael. Supports SSR.
|
||||
**Not ready for production use.**
|
||||
**Not ready for production use.**
|
||||
|
|
|
@ -1,3 +1 @@
|
|||
analyzer:
|
||||
strong-mode:
|
||||
implicit-casts: false
|
||||
include: package:lints/recommended.yaml
|
|
@ -1,5 +1,5 @@
|
|||
import 'package:jael_web/jael_web.dart';
|
||||
import 'package:jael_web/elements.dart';
|
||||
import 'package:jael3_web/jael3_web.dart';
|
||||
import 'package:jael3_web/elements.dart';
|
||||
part 'main.g.dart';
|
||||
|
||||
@Jael(template: '''
|
||||
|
@ -9,6 +9,7 @@ part 'main.g.dart';
|
|||
</div>
|
||||
''')
|
||||
class Hello extends Component with _HelloJaelTemplate {
|
||||
@override
|
||||
DateTime get now => DateTime.now();
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import 'dart:async';
|
||||
import 'package:jael_web/jael_web.dart';
|
||||
import 'package:jael3_web/jael3_web.dart';
|
||||
part 'stateful.g.dart';
|
||||
|
||||
void main() {}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import 'package:jael_web/jael_web.dart';
|
||||
import 'package:jael3_web/jael3_web.dart';
|
||||
part 'using_components.g.dart';
|
||||
|
||||
@Jael(template: '''
|
||||
|
@ -19,6 +19,7 @@ class MyApp extends Component with _MyAppJaelTemplate {}
|
|||
</div>
|
||||
''')
|
||||
class LabeledInput extends Component with _LabeledInputJaelTemplate {
|
||||
@override
|
||||
final String? name;
|
||||
|
||||
LabeledInput({this.name});
|
||||
|
|
|
@ -2,9 +2,9 @@ import 'dart:async';
|
|||
import 'package:analyzer/dart/element/element.dart';
|
||||
import 'package:build/build.dart';
|
||||
import 'package:code_builder/code_builder.dart';
|
||||
import 'package:jael/jael.dart' as jael;
|
||||
import 'package:jael_preprocessor/jael_preprocessor.dart' as jael;
|
||||
import 'package:jael_web/jael_web.dart';
|
||||
import 'package:jael3/jael3.dart' as jael;
|
||||
import 'package:jael3_preprocessor/jael3_preprocessor.dart' as jael;
|
||||
import 'package:jael3_web/jael3_web.dart';
|
||||
import 'package:path/path.dart' as p;
|
||||
import 'package:source_gen/source_gen.dart';
|
||||
import 'util.dart';
|
||||
|
@ -33,9 +33,9 @@ class JaelComponentGenerator extends GeneratorForAnnotation<Jael> {
|
|||
throw 'Both `template` and `templateUrl` cannot be null.';
|
||||
}
|
||||
|
||||
if (ann.template != null)
|
||||
if (ann.template != null) {
|
||||
templateString = ann.template;
|
||||
else {
|
||||
} else {
|
||||
var dir = p.dirname(inputId.path);
|
||||
var assetId = AssetId(inputId.package, p.join(dir, ann.templateUrl));
|
||||
if (!await buildStep.canRead(assetId)) {
|
||||
|
@ -47,7 +47,7 @@ class JaelComponentGenerator extends GeneratorForAnnotation<Jael> {
|
|||
|
||||
var fs = BuildFileSystem(buildStep, inputId.package);
|
||||
var errors = <jael.JaelError>[];
|
||||
var doc = await jael.parseDocument(templateString!,
|
||||
var doc = jael.parseDocument(templateString!,
|
||||
sourceUrl: inputId.uri, asDSX: ann.asDsx!, onError: errors.add);
|
||||
if (errors.isEmpty) {
|
||||
doc = await jael.resolve(doc!, fs.file(inputId.uri).parent,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
name: jael_web
|
||||
version: 0.0.0
|
||||
name: jael3_web
|
||||
version: 1.0.0
|
||||
description: Experimental virtual DOM/SPA engine built on Jael. Supports SSR.
|
||||
publish_to: none
|
||||
environment:
|
||||
|
@ -8,18 +8,10 @@ dependencies:
|
|||
build: ^2.0.2
|
||||
build_config: ^1.0.0
|
||||
code_builder: ^4.0.0
|
||||
jael:
|
||||
git:
|
||||
url: https://github.com/dukefirehawk/angel.git
|
||||
ref: sdk-2.12.x_nnbd
|
||||
path: packages/jael/jael
|
||||
jael_preprocessor:
|
||||
git:
|
||||
url: https://github.com/dukefirehawk/angel.git
|
||||
ref: sdk-2.12.x_nnbd
|
||||
path: packages/jael/jael_preprocessor
|
||||
jael3: ^4.2.0
|
||||
jael3_preprocessor: ^4.2.0
|
||||
source_gen: ^1.0.2
|
||||
dev_dependencies:
|
||||
build_runner: ^2.0.4
|
||||
build_web_compilers: ^3.0.0
|
||||
pedantic: ^1.11.1
|
||||
lints: ^1.0.0
|
Loading…
Reference in a new issue