Finish build pipeline
This commit is contained in:
parent
4c0b8ecb17
commit
c9f9ad0753
9 changed files with 11 additions and 47 deletions
|
@ -1,3 +1,6 @@
|
|||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake_dart_utils")
|
||||
cmake_minimum_required(VERSION 3.0)
|
||||
project(angel_wings)
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake_dart_utils/cmake")
|
||||
find_package(Dart REQUIRED)
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
add_subdirectory(lib/src)
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
include: package:pedantic/analysis_options.yaml
|
||||
analyzer:
|
||||
exclude:
|
||||
- cmake_dart_utils/example/*
|
||||
strong-mode:
|
||||
implicit-casts: false
|
|
@ -4,7 +4,7 @@ import 'package:angel_static/angel_static.dart';
|
|||
import 'package:angel_wings/angel_wings.dart';
|
||||
import 'package:file/local.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'pretty_log.dart';
|
||||
import 'package:pretty_logging/pretty_logging.dart';
|
||||
|
||||
main() async {
|
||||
var app = Angel();
|
||||
|
|
|
@ -1,35 +0,0 @@
|
|||
import 'package:angel_http_exception/angel_http_exception.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:io/ansi.dart';
|
||||
|
||||
/// Prints the contents of a [LogRecord] with pretty colors.
|
||||
void prettyLog(LogRecord record) {
|
||||
var code = chooseLogColor(record.level);
|
||||
|
||||
if (record.error == null) print(code.wrap(record.toString()));
|
||||
|
||||
if (record.error != null) {
|
||||
var err = record.error;
|
||||
if (err is AngelHttpException && err.statusCode != 500) return;
|
||||
print(code.wrap(record.toString() + '\n'));
|
||||
print(code.wrap(err.toString()));
|
||||
|
||||
if (record.stackTrace != null) {
|
||||
print(code.wrap(record.stackTrace.toString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Chooses a color based on the logger [level].
|
||||
AnsiCode chooseLogColor(Level level) {
|
||||
if (level == Level.SHOUT) {
|
||||
return backgroundRed;
|
||||
} else if (level == Level.SEVERE) {
|
||||
return red;
|
||||
} else if (level == Level.WARNING) {
|
||||
return yellow;
|
||||
} else if (level == Level.INFO) {
|
||||
return cyan;
|
||||
} else if (level == Level.FINER || level == Level.FINEST) return lightGray;
|
||||
return resetAll;
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
include_directories(http-parser)
|
||||
include_directories("${CMAKE_CURRENT_LIST_DIR}")
|
||||
add_dart_native_extension(angel_wings
|
||||
http-parser/http_parser.c
|
||||
angel_wings.h angel_wings.cc
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
include:
|
||||
- lib/src
|
||||
sources:
|
||||
- angel_wings|lib/src/angel_wings.cc
|
||||
- angel_wings|lib/src/bind.cc
|
||||
- angel_wings|lib/src/wings_socket.cc
|
BIN
lib/src/libangel_wings.dylib
Executable file
BIN
lib/src/libangel_wings.dylib
Executable file
Binary file not shown.
1
libangel_wings.dylib
Symbolic link
1
libangel_wings.dylib
Symbolic link
|
@ -0,0 +1 @@
|
|||
/Users/thosakwe/Source/Angel/wings/lib/src/libangel_wings.dylib
|
|
@ -3,10 +3,9 @@ environment:
|
|||
sdk: ">=2.0.0-dev <3.0.0"
|
||||
dependencies:
|
||||
angel_framework: ^2.0.0-alpha
|
||||
build_native: ^0.0.11
|
||||
mock_request: ^1.0.0
|
||||
dev_dependencies:
|
||||
angel_static: ^2.0.0
|
||||
build_runner: ^1.0.0
|
||||
io: ^0.3.2
|
||||
pedantic: ^1.0.0
|
||||
pretty_logging: ^1.0.0
|
Loading…
Reference in a new issue