mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
[chore] svg improvements (#3145)
* chore: remove use of svgWidget() * refactor: redundant code in svg * feat: add generator to generate flowy_svgs.g.dart * chore: reference new package in pubspec * chore: remove svg widget from flowy_infra * refactor: update usage in flowy_infra_ui * refactor: usage in appflowy_flutter * fix: error with script not running * fix: error with script not running * fix: use unix style file path * feat: use generation script for flowy svgs * feat: add task * fix: add required missing semicolon * fix: rebase errors * feat: update generate build script * fix: solve duplicate entries in the generated file * fix: compilation errors * fix: replace all spaces with an underscore * feat: use FlowySvgs * feat: reduce assets and simplify * refactor: do not return empty svg widget * fix: rebase errors * fix: analyzer warnings * chore: remove flowy_icons from tracking * chore: fix generate flowy icons script linux * chore: macos/linux script * chore: add rsync --------- Co-authored-by: Mathias Mogensen <mathiasrieckm@gmail.com> Co-authored-by: Mathias Mogensen <mathias@appflowy.io>
This commit is contained in:
@ -0,0 +1,26 @@
|
||||
@echo off
|
||||
|
||||
echo 'Generating flowy icon files'
|
||||
|
||||
REM Store the current working directory
|
||||
set "original_dir=%CD%"
|
||||
|
||||
REM Change the current working directory to the script's location
|
||||
cd /d "%~dp0"
|
||||
|
||||
cd ..\..\..\appflowy_flutter
|
||||
|
||||
REM copy the resources/translations folder to
|
||||
REM the appflowy_flutter/assets/translation directory
|
||||
echo Copying resources/flowy_icons to appflowy_flutter/assets/flowy_icons
|
||||
xcopy /E /Y /I ..\resources\flowy_icons assets\flowy_icons
|
||||
|
||||
call flutter packages pub get
|
||||
|
||||
echo Generating FlowySvg class
|
||||
call dart run flowy_svg
|
||||
|
||||
echo Done generating icon files.
|
||||
|
||||
REM Return to the original directory
|
||||
cd /d "%original_dir%"
|
@ -0,0 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Generating flowy icon files"
|
||||
|
||||
# Store the current working directory
|
||||
original_dir=$(pwd)
|
||||
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
# Navigate to the project root
|
||||
cd ../../../appflowy_flutter
|
||||
|
||||
rm -rf assets/flowy_icons/
|
||||
mkdir -p assets/flowy_icons/
|
||||
rsync -r ../resources/flowy_icons/ assets/flowy_icons/
|
||||
|
||||
flutter packages pub get
|
||||
|
||||
echo "Generating FlowySvg classes"
|
||||
dart run flowy_svg
|
||||
|
||||
echo "Done generating icon files."
|
||||
|
||||
# Return to the original directory
|
||||
cd "$original_dir"
|
@ -22,6 +22,8 @@ cd freezed
|
||||
REM Allow execution permissions on CI
|
||||
chmod +x generate_freezed.cmd
|
||||
call generate_freezed.cmd %*
|
||||
|
||||
REM Return to the main script directory
|
||||
cd ..
|
||||
|
||||
echo Generating env files using build_runner
|
||||
@ -30,5 +32,14 @@ REM Allow execution permissions on CI
|
||||
chmod +x generate_env.cmd
|
||||
call generate_env.cmd %*
|
||||
|
||||
REM Return to the main script directory
|
||||
cd ..
|
||||
|
||||
echo Generating svg files using flowy_svg
|
||||
cd flowy_icons
|
||||
REM Allow execution permissions on CI
|
||||
chmod +x generate_flowy_icons.cmd
|
||||
call generate_flowy_icons.cmd %*
|
||||
|
||||
REM Return to the original directory
|
||||
cd /d "%original_dir%"
|
||||
|
@ -22,6 +22,8 @@ cd freezed
|
||||
# Allow execution permissions on CI
|
||||
chmod +x ./generate_freezed.sh
|
||||
./generate_freezed.sh "$@"
|
||||
|
||||
# Return to the main script directory
|
||||
cd ..
|
||||
|
||||
echo "Generating env files using build_runner"
|
||||
@ -30,5 +32,14 @@ cd env
|
||||
chmod +x ./generate_env.sh
|
||||
./generate_env.sh "$@"
|
||||
|
||||
# Return to the main script directory
|
||||
cd ..
|
||||
|
||||
echo "Generating svg files using flowy_svg"
|
||||
cd flowy_icons
|
||||
# Allow execution permissions on CI
|
||||
chmod +x ./generate_flowy_icons.sh
|
||||
./generate_flowy_icons.sh "$@"
|
||||
|
||||
# Return to the original directory
|
||||
cd "$original_dir"
|
||||
|
@ -47,7 +47,7 @@ RUN flutter doctor
|
||||
RUN dart pub global activate protoc_plugin 20.0.1
|
||||
|
||||
# Install build dependencies for AppFlowy
|
||||
RUN sudo pacman -S --noconfirm git libkeybinder3 sqlite clang
|
||||
RUN sudo pacman -S --noconfirm git libkeybinder3 sqlite clang rsync
|
||||
RUN source ~/.cargo/env && cargo install --force cargo-make duckscript_cli
|
||||
|
||||
# Build AppFlowy
|
||||
|
Reference in New Issue
Block a user