Dart & Flutter toolkit
A Bun cmd to help do package manager with npm.
- Create npm monorepo
- Add
package.json
into sub dart pkg like
{
// only support scoped package
// /dart- mush prefix pkg name
"name": "@<scope_name>/dart-<pubspec_name>",
"type": "module",
"exports": {
// for bun module resolver
"bun": "pubspec.yaml"
},
"scripts": {
"postinstall": "bunx @octohelm/dartpkg postinstall"
}
}
Then after bun install
:
pubspec.yaml
patchedname
version
dependencies
anddev_dependencies
if exists
pubspec_overrides.yaml
created.
We could add scripts
sub in each dart pkg, and do incremental build with turbo
{
"scripts": {
"gen": "dart run build_runner build --delete-conflicting-outputs",
"fmt": "dart fix --apply && dart format -o write ./lib",
"test": "dart test",
// for flutter pkg
// "test": "flutter test"
}
}