From f5f317891746cf4e35cbd0b480e4bb1f2e63b355 Mon Sep 17 00:00:00 2001 From: Markus Wageringel Date: Sun, 17 Jul 2022 10:44:32 +0200 Subject: [PATCH] clean up make and ignore file --- .gitignore | 6 ++++++ Makefile | 14 +++++++++----- analysis_options.yaml | 29 +++++++++++++++++++++++++++++ 3 files changed, 44 insertions(+), 5 deletions(-) create mode 100644 analysis_options.yaml diff --git a/.gitignore b/.gitignore index 691da99..52c5622 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,13 @@ +/ios/ +/windows/ +/gh-pages/ *.sage.py /fonts/ /website/demo/ *.png +*.ico +*.apk +*.apk.sha1 # Miscellaneous *.class diff --git a/Makefile b/Makefile index 581907f..1fc6834 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ all: app web app: fonts icons flutter build apk BASEHREF=/demo/ -web: +web: fonts icons flutter build web --base-href=$(BASEHREF) --release rm -rf website/demo/ cp -p -r build/web/ website/demo/ @@ -17,9 +17,9 @@ run: fonts icons flutter run test: flutter test test/expressions_test.dart -zip: - rm -f everest.zip - zip -r everest.zip . -x '/.git/*' -x '/.dart_tool/*' -x '/.idea/*' -x '/build/*' +clean: icons-clean + flutter clean + rm -rf website/demo/ icons: android/app/src/main/res/mipmap-hdpi/ic_launcher.png website/favicon.ico web/favicon.ico web/icons/Icon-192.png web/icons/Icon-maskable-192.png web/icons/Icon-512.png web/icons/Icon-maskable-512.png android/app/src/main/res/mipmap-hdpi/ic_launcher.png: assets/launcher_icon.png @@ -35,6 +35,10 @@ web/icons/Icon-192.png web/icons/Icon-maskable-192.png: assets/launcher_icon.svg web/icons/Icon-512.png web/icons/Icon-maskable-512.png: assets/launcher_icon.svg mkdir -p web/icons/ inkscape -w 512 -h 512 assets/launcher_icon.svg -o $@ +icons-clean: + rm -f android/app/src/main/res/mipmap-*/ic_launcher.png + rm -f website/favicon.ico web/favicon.ico web/icons/*.png + rm -f assets/launcher_icon.png fonts: fonts/NotoSansMath-Regular.ttf fonts/NotoSansMath-Regular.ttf: | build/upstream/Noto_Sans_Math.zip @@ -45,4 +49,4 @@ build/upstream/Noto_Sans_Math.zip: wget -O build/upstream/Noto_Sans_Math.zip https://fonts.google.com/download?family=Noto%20Sans%20Math .INTERMEDIATE: build/upstream/Noto_Sans_Math.zip -.PHONY: all app web gh-pages host run test zip fonts icons +.PHONY: all app web gh-pages host run test zip fonts icons icons-clean clean diff --git a/analysis_options.yaml b/analysis_options.yaml new file mode 100644 index 0000000..61b6c4d --- /dev/null +++ b/analysis_options.yaml @@ -0,0 +1,29 @@ +# This file configures the analyzer, which statically analyzes Dart code to +# check for errors, warnings, and lints. +# +# The issues identified by the analyzer are surfaced in the UI of Dart-enabled +# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be +# invoked from the command line by running `flutter analyze`. + +# The following line activates a set of recommended lints for Flutter apps, +# packages, and plugins designed to encourage good coding practices. +include: package:flutter_lints/flutter.yaml + +linter: + # The lint rules applied to this project can be customized in the + # section below to disable rules from the `package:flutter_lints/flutter.yaml` + # included above or to enable additional rules. A list of all available lints + # and their documentation is published at + # https://dart-lang.github.io/linter/lints/index.html. + # + # Instead of disabling a lint rule for the entire project in the + # section below, it can also be suppressed for a single line of code + # or a specific dart file by using the `// ignore: name_of_lint` and + # `// ignore_for_file: name_of_lint` syntax on the line or in the file + # producing the lint. + rules: + # avoid_print: false # Uncomment to disable the `avoid_print` rule + # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options