Skip to content

Commit 2ff2d28

Browse files
author
Christoph Bühler
committed
chore: move code
1 parent 78655c1 commit 2ff2d28

File tree

130 files changed

+11275
-31
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

130 files changed

+11275
-31
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- uses: subosito/flutter-action@v2
1818
with:
1919
channel: 'stable'
20-
- run: flutter pub get
20+
- run: dart pub get
2121
- name: release
2222
uses: cycjimmy/semantic-release-action@v3
2323
with:

.github/workflows/test.yml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,8 @@ jobs:
1717
- uses: subosito/flutter-action@v2
1818
with:
1919
channel: 'stable'
20-
- run: flutter pub get
20+
- run: dart pub get
2121
- run: dart format --fix --set-exit-if-changed .
22-
- run: flutter analyze
23-
- run: flutter test --coverage
24-
- name: Setup LCOV
25-
uses: hrishikesh-kadam/setup-lcov@v1
26-
- name: Report code coverage
27-
uses: zgosalvez/github-actions-report-lcov@v3
28-
with:
29-
coverage-files: coverage/lcov*.info
30-
artifact-name: code-coverage-report
31-
github-token: ${{ secrets.GITHUB_TOKEN }}
32-
update-comment: true
22+
- run: dart analyze
23+
- run: dart run build_runner build --delete-conflicting-outputs
24+
- run: dart test

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# See https://www.dartlang.org/guides/libraries/private-files
22

3+
!bin/
4+
35
# Files and directories created by pub
46
.dart_tool/
57
.packages
@@ -9,6 +11,8 @@ pubspec.lock
911

1012
# Generated Dart Files
1113
*.g.dart
14+
*.freezed.dart
15+
*.mocks.dart
1216

1317
# Directory created by dartdoc
1418
# If you don't generate documentation locally you can remove this line.

.releaserc.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
"@semantic-release/exec",
1616
{
1717
"verifyConditionsCmd": "if [ -z \"$CREDENTIALS\" ]; then exit 1; fi && mkdir -p ~/.config/dart && echo \"$CREDENTIALS\" > ~/.config/dart/pub-credentials.json",
18-
"prepareCmd": "sed -i 's/^version: .*$/version: ${nextRelease.version}/' pubspec.yaml",
19-
"publishCmd": "flutter pub publish -f"
18+
"prepareCmd": "dart run build_runner build --delete-conflicting-outputs && sed -i 's/^version: .*$/version: ${nextRelease.version}/' pubspec.yaml",
19+
"publishCmd": "dart pub publish -f"
2020
}
2121
],
2222
[

CHANGELOG.md

Lines changed: 237 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,237 @@
1+
## 1.4.0
2+
3+
- Adds HoverExtensions fo the web template for easier hover effects
4+
- Wraps `MaterialApp` with `ResponsiveApp` in `main.dart` for web template
5+
6+
## 1.3.3
7+
8+
- Fixes to avoid StateError when HOME environment variable not set. When this situation happens, XDG_CONFIG_HOME location is not taken into account to find stacked config
9+
10+
## 1.3.2
11+
12+
- Avoids running pub command if has last version on the system
13+
- Avoids notify new version available for compile and update commands
14+
15+
## 1.3.1
16+
17+
- Fixes create service bug introduced in 1.3.0
18+
19+
## 1.3.0
20+
### New Feature
21+
Adds template functionality to the create commands and adds a new --template=web template for creating a Web app with Stacked.
22+
23+
## 1.2.0
24+
25+
- Adds support for `version` custom dimension
26+
- Adds support for `name` custom dimension
27+
- Sends `stacked_cli` version custom dimension on every event
28+
29+
## 1.1.12
30+
31+
- Changes executableName to `stacked`
32+
- Refactors `_handleVersion` to use PubService
33+
- Updates `_handleFirstRun` for prettier notification
34+
- Shows notification when new version is available
35+
36+
## 1.1.11
37+
38+
- Updates create bottom_sheet command to make use of StackedApp annotation
39+
- Updates create dialog command to make use of StackedApp annotation
40+
- Updates packages
41+
42+
## 1.1.10
43+
44+
- Adds `model` flag option to create bottom_sheet command to use or not a model
45+
- Adds `model` flag option to create dialog command to use or not a model
46+
47+
## 1.1.9+1
48+
49+
- Refactor ProcessService
50+
- Improves version global option to be retrieved on the fly
51+
52+
## 1.1.9
53+
54+
- Fixes version global option
55+
56+
## 1.1.8
57+
58+
- Adds global option to show `stacked_cli` version
59+
- Adds global option to enable sending of analytics data
60+
- Adds global option to disable sending of analytics data
61+
- Adds prompt for sending analytics at first run
62+
- Fixes unit tests
63+
- Fix: Delete service command removes correct dependencies and code
64+
65+
## 1.1.7
66+
67+
- Logs exception events to Google Analytics
68+
69+
## 1.1.6
70+
71+
- Adds create dialog command
72+
- Improves shouldAppendTemplate function
73+
- Executes `clean` function on create app command to
74+
- Deletes widget_test.dart file
75+
- Removes unused imports
76+
77+
## 1.1.5
78+
79+
- Fixes support for relative router file path
80+
81+
## 1.1.4
82+
83+
- Adds create bottom_sheet command
84+
- Improves templates
85+
- Improves analytics responsiveness, no more delays on commands execution
86+
- Updates example app
87+
88+
## 1.1.3+1
89+
90+
- Replaces `stacked_tools` strings with `stacked_cli`
91+
92+
## 1.1.3
93+
94+
- Updates the `HomeViewModel` template to use `rebuildUi` instead of `notifyListeners`
95+
- Updates `StartupViewModel` to use type safe navigation when going to the `HomeView`
96+
97+
## 1.1.2
98+
99+
- Adds the new Update command
100+
101+
## 1.1.1+1
102+
103+
- Updates cli link in readme
104+
- Sets `runInShell` true in an attempt to fix [this issue](https://github.com/FilledStacks/stacked/issues/811?notification_referrer_id=NT_kwDOADbP6rI1MjQxODI0ODQ5OjM1OTIxNzA)
105+
106+
## 1.1.1
107+
108+
- Adds google analytics to see where to improve the app
109+
110+
## 1.1.0
111+
112+
We had to update this package version to 1.1.0 because this package use to belong to a different developer. They released starting at 1.0.0. This is why we're suddenly jumping from 0.2.6 to 1.1.0.
113+
114+
## 0.2.6
115+
116+
- Adds the new Generate command
117+
118+
## 0.2.5
119+
120+
- Adds Stacked route observer to app template
121+
122+
## 0.2.4
123+
124+
- Promotes the package to stable
125+
126+
## 0.2.4-beta.4
127+
128+
- Removes lib and test folder from the default paths because there is no need to include them as they can't be changed
129+
- Changes getImportPath to sanitizePath, more appropriate method name
130+
- Removes path of app name, if any, to render template
131+
- Changes Stacked config filename to `stacked.json`
132+
- Changes ConfigService to support XDG_CONFIG_HOME
133+
- Moves again loadConfig to each command instead of bootstrap
134+
135+
## 0.2.4-beta.3
136+
137+
- Updates the compiled templates since the template was changes
138+
- Updates viewModelBuilder on templates to use short hand function notation
139+
- Updates ViewModel instance name from model to viewModel
140+
- Updates StackedView template builder indentation
141+
142+
## 0.2.4-beta.2
143+
144+
- Removes the depdency override for stacked
145+
146+
## 0.2.4-beta.1
147+
148+
- Add lineLength to Config model
149+
- Update stacked config on templates
150+
- Use ConfigService for _formattingLineLength default value
151+
- Add line-length option support to create app command
152+
- Load configuration on bootstrap instead of each command
153+
- Fix replaceCustomPaths, now only process values which keys contains `path` word
154+
- Update example app
155+
156+
## 0.2.4-beta.0
157+
158+
- Changes View template to use StackedView, aka ViewModelWidget, as default
159+
- Adds config option `v1` to use alternative view builder style
160+
- Adds flag option `v1` to use alternative view builder style, overrides config option
161+
- Adds `v1`support for create app command
162+
- Removes `widget_test` after on create app command
163+
- Uses relativeLocatorPath on every template
164+
- Fixes TestHelpers import on views and services tests
165+
- Improves getFilePathToHelpersAndMocks
166+
- Updates example app to align changes
167+
168+
## 0.2.3-beta.0
169+
170+
- Fixes testHelpersPath default value
171+
- Adds test_helpers filename to service_test template
172+
- Changes default values on stacked config template
173+
- Loads config on create app command
174+
175+
## 0.2.2
176+
177+
- Fixes the generated stacked config file
178+
179+
## 0.2.1
180+
181+
### Additions
182+
- Adds config option to set the name of the locator used to register mocks for testing
183+
- Adds config option to set the name of the function that registers all mocks for testing
184+
185+
### Fixes
186+
- Makes test_helpers_path replace the entire value with the new value provided
187+
- Fixes hard check for test location
188+
189+
## 0.2.0
190+
191+
### Feature: Stacked config
192+
- Adds stacked config so you can use different paths for your file generation making it usable with all projects
193+
194+
### Bugs
195+
- Fixes: Duplicate import in test_helper.dart file
196+
197+
## 0.2.0
198+
199+
- Adds stacked config so you can use different paths for your generating
200+
201+
## 0.1.6
202+
- Updates Formatting to be only on specific files
203+
- Adds line-length or -l option for formatting length default is 80
204+
- Adds delete service command
205+
206+
## 0.1.5
207+
- Updates dependencies
208+
209+
## 0.1.4
210+
211+
- Adds colorized outputs on command line
212+
- Runs build runner and pub get on view and service creation
213+
- Adds delete command for views
214+
- you can now run `stacked delete view view_name ` to delete view_name view,viewmodel and tests also remove view from `app.dart`
215+
- Fixes wrong pubspec.yaml file selection on non-root commands
216+
217+
## 0.1.2+1
218+
219+
- Adds documentation link to basic docs
220+
221+
## 0.1.2
222+
223+
- Fixes bug that loads pubspec on project create
224+
225+
## 0.1.1
226+
227+
- Adds executable to the pubspec for global activation
228+
- Fixes template bugs for app generate
229+
230+
## 0.1.0
231+
232+
### Initial Release
233+
234+
This version of the cli has 3 create commands:
235+
- stacked create app: This creates a brand new flutter project with all the stacked functionality setup
236+
- stacked create view: This creates a new view in the project and makes all required changes
237+
- stacked create service: This creates a new service in the project and makes all required changes

README.md

Lines changed: 40 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,40 @@
1-
# New Package for Stacked
2-
3-
Created from the `package-template`.
4-
5-
After creating the repository, proceed with the following instructions:
6-
7-
- Update the repository settings to adhere to the conventions:
8-
- Allow squash&merge commits.
9-
- Suggest update.
10-
- Require linear history.
11-
- Add branch protection rules:
12-
- Require pull request reviews before merging.
13-
- Require status checks to pass before merging.
14-
- Allow the user with the DEPLOY token secret to overwrite pull request.
15-
- Create the flutter package with `flutter create -t package --project-name NAME .`
16-
- Update the content in the `README` file.
1+
# Stacked CLI
2+
3+
The official CLI (Command Line Interface) dev tools for working with the Stacked framework. Stacked is a framework built in Flutter for production teams. It is built for maintenance, readability, and scaleability. To read about the usage of this tool read the [Stacked CLI docs](https://stacked.filledstacks.com/docs/Tooling/stacked-cli)
4+
5+
## Running the code
6+
7+
_Todo: write out the steps to run this project locally_
8+
9+
To test the updated executable code locally run
10+
11+
```shell
12+
# If you're inside the stacked_cli folder use . otherwise use path to stacked_cli directory
13+
dart pub global activate --source path .
14+
```
15+
16+
## Code Structure
17+
18+
_Todo: Write out a code base overview to explain how things are built_
19+
20+
## Templates
21+
22+
Templates are written as normal dart files using mustache templating. A file that can be templated should end in .stk . All the constants that can be replaced in templates ca be found in `lib/src/templates/template_constants.dart`. The values we have to substitute at the moment is:
23+
24+
- viewName: The name of the view class in dart. Given a name 'details' expects viewName to equal DetailsView
25+
26+
- viewFolderName: The name of the folder that the view will be created in. This is a snake_case version of the name.
27+
28+
- viewFileName: The name of the file that the view is created in with the dart extension. Given a name 'details' expects viewFileName to equal `details_view.dart`
29+
30+
- viewModelName: The name of the viewmodel class in dart. Given a name 'details' expects viewModelName to equal DetailsViewModel
31+
32+
- viewModelFileName: The name of the file that the viewmodel is created in with the dart extension. Given a name 'details' expects viewModelFileName to equal details_viewmodel.dart
33+
34+
- packageName: The name of the package that the cli tool is running in. This is read from the pubspec.yaml file in the root folder.
35+
36+
- serviceName: The name of the service class in Dart. Given a service name stripe expect `StripeService`
37+
38+
- serviceFilename: The name of the file the service class will be stored in. Given a name stripe expect `stripe_service.dart` to be returned.
39+
40+
_Todo: Change to a table and add all other template variables here_

analysis_options.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# This file configures the static analysis results for your project (errors,
2+
# warnings, and lints).
3+
#
4+
# This enables the 'recommended' set of lints from `package:lints`.
5+
# This set helps identify many issues that may lead to problems when running
6+
# or consuming Dart code, and enforces writing Dart using a single, idiomatic
7+
# style and format.
8+
#
9+
# If you want a smaller set of lints you can change this to specify
10+
# 'package:lints/core.yaml'. These are just the most critical lints
11+
# (the recommended set includes the core lints).
12+
# The core lints are also what is used by pub.dev for scoring packages.
13+
14+
include: package:lints/recommended.yaml
15+
16+
# Uncomment the following section to specify additional rules.
17+
18+
# linter:
19+
# rules:
20+
# - camel_case_types
21+
22+
analyzer:
23+
exclude:
24+
- '**/*.g.dart'
25+
- '**/*.freezed.dart'
26+
- '**/*.mocks.dart'
27+
# For more information about the core and recommended set of lints, see
28+
# https://dart.dev/go/core-lints
29+
30+
# For additional information about configuring this file, see
31+
# https://dart.dev/guides/language/analysis-options

0 commit comments

Comments
 (0)