Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix windows dev #52

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion bin/stacked.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ Future<void> main(List<String> arguments) async {
negatable: false,
help: kCommandHelpVersion,
)
..argParser.addFlag(ksDisableVersionCheck,
negatable: false, help: kCommandHelpDisableVersionCheck)
// ..argParser.addFlag(
// ksEnableAnalytics,
// negatable: false,
Expand Down Expand Up @@ -56,7 +58,9 @@ Future<void> main(List<String> arguments) async {
/// triggered twice
// if (_handleAnalytics(argResults)) exit(0);

await _notifyNewVersionAvailable(arguments: arguments);
!argResults[ksDisableVersionCheck]
? await _notifyNewVersionAvailable(arguments: arguments)
: {};

runner.run(arguments);
} on InvalidStackedStructureException catch (e) {
Expand Down
2 changes: 2 additions & 0 deletions lib/src/constants/command_constants.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/// Stores all the commands used throughout the app that
library;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is the library keyword added to this file, and the same for the one below?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Se my other PR for Offline mode, I've answered there


const String ksDart = 'dart';
const String ksFlutter = 'flutter';
Expand All @@ -12,6 +13,7 @@ const String ksBuildRunner = 'build_runner';
const String ksDeleteConflictOutputs = 'delete-conflicting-outputs';
const String ksDeleteConflictingOutputs = '--delete-conflicting-outputs';
const String ksVersion = 'version';
const String ksDisableVersionCheck = 'disable-version-check';
const String ksEnableAnalytics = 'enable-analytics';
const String ksDisableAnalytics = 'disable-analytics';
const String ksExcludeRoute = 'exclude-route';
Expand Down
4 changes: 4 additions & 0 deletions lib/src/constants/message_constants.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/// Stores all the messages used throughout the app that communicates
/// with the user of the package.
library;

/// Message shown when we encounter a failure during generation that's caused by an invalid
/// app structure.
Expand All @@ -25,6 +26,9 @@ for the stacked-cli roadmap.

const String kCommandHelpVersion = 'Print the current version.';

const String kCommandHelpDisableVersionCheck =
'Disables version check, primarily used during development';

const String kCommandHelpEnableAnalytics = 'Enable Analytics.';

const String kCommandHelpDisableAnalytics = 'Disable Analytics.';
Expand Down
8 changes: 6 additions & 2 deletions lib/src/services/template_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,12 @@ class TemplateService {
}

final outputTemplate = Template(kTemplateDataStructure);
final templateItemsData = {
'templateItems': allTemplateItems.map((e) => e.toJson()).toList(),
final Map<String, List<Map<String, dynamic>>> templateItemsData = {
'templateItems': allTemplateItems.map((e) {
Map<String, dynamic> result = e.toJson();
result['path'] = result['path'].replaceAll(r'\', '/');
return result;
}).toList(),
};

final allTemplateItemsContent =
Expand Down
14 changes: 7 additions & 7 deletions lib/src/templates/compiled_constants.dart
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
/// NOTE: This is generated code from the compileTemplates command. Do not
/// NOTE: This is generated code from the compileTemplates command. Do not
/// modify by hand.
/// This file should be checked into source control.

Map<String, List<String>> kCompiledTemplateTypes = {
'app': [
'web',
'mobile',
'web',
],
'widget': [
'bottom_sheet': [
'empty',
],
'dialog': [
'empty',
],
'view': [
'service': [
'empty',
'web',
],
'service': [
'view': [
'empty',
'web',
],
'bottom_sheet': [
'widget': [
'empty',
],
};
Loading