A Codelessly starter project brick to quickly get started with Codelessly SDK.
Generated by mason 🧱
-
Install mason globally
dart pub global activate mason
-
Install the brick
mason add codelessly_starter -g --git-url https://github.com/Codelessly/codelessly_starter_brick
-
Run the brick in an empty directory.
mason make codelessly_starter
-
Follow the instructions in the terminal. Provide authToken and layoutID displayed in the Codelessly editor.
- Official Mason Documentation
- Code generation with Mason Blog
- Very Good Livestream: Felix Angelov Demos Mason
- Flutter Package of the Week: Mason
- Observable Flutter: Building a Mason brick
- Meet Mason: Flutter Vikings 2022
First of all, enable flutter and get dependencies inside the brick directory by running:
cd __brick
Next get flutter dependencies:
flutter pub get
Make any changes you like, and once you're satisfied and want to publish your changes to this brick, run:
flutter build web --release --dart-define=FLUTTER_WEB_USE_SKIA=true
To regenerate the build folder output so that CI/CD services like Netlify and Vercel can reference a pre-built and updated /build/ folder directly without needing to build from scratch.
After that, clean up the brick directory by removing these excluded directories and files:
- .dart_tool
- .metadata
- pubspec.lock
- .flutter-plugins
- .flutter-plugins-dependencies
If you don't delete the .dart_tool folder, mason brick creation will take upwards of 400 seconds.