diff --git a/README.md b/README.md index 4ac19d39..022eb162 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,13 @@ ###### Documentation languages -| [pt_BR](README-pt_BR.md) | en_US - this file |[zh_CN](README-zh_CN.md) | -|-------|-------|-------| +| [pt_BR](README-pt_BR.md) | en_US - this file | [zh_CN](README-zh_CN.md) | +| ------------------------ | ----------------- | ------------------------ | Official CLI for the GetX™ framework. ```dart // To install: -pub global activate get_cli +pub global activate get_cli // (to use this add the following to system PATH: [FlutterSDKInstallDir]\bin\cache\dart-sdk\bin flutter pub global activate get_cli @@ -31,7 +31,7 @@ get create page:home // (Screens have controller, view, and binding) // Note: you can use any name, ex: `get screen page:login` // Nota: use this option if the chosen structure was CLEAN (by Arktekko) -get create screen:home +get create screen:home // To create a new controller in a specific folder: // Note: you don't need to reference the folder, @@ -65,20 +65,6 @@ get generate model on home with assets/models/user.json --skipProvider //Note: the URL must return a json format get generate model on home from "https://api.github.com/users/CpdnCristiano" -// To install a package in your project (dependencies): -get install camera - -// To install several packages from your project: -get install http path camera - -// To install a package with specific version: -get install path:1.6.4 - -// You can also specify several packages with version numbers - -// To install a dev package in your project (dependencies_dev): -get install flutter_launcher_icons --dev - // To remove a package from your project: get remove http diff --git a/lib/commands/commands_list.dart b/lib/commands/commands_list.dart index 6585211a..4ebefdf4 100644 --- a/lib/commands/commands_list.dart +++ b/lib/commands/commands_list.dart @@ -22,7 +22,6 @@ final List commands = [ HelpCommand(), VersionCommand(), InitCommand(), - InstallCommand(), RemoveCommand(), SortCommand(), UpdateCommand(), diff --git a/lib/commands/impl/commads_export.dart b/lib/commands/impl/commads_export.dart index c43c1aed..4ed9282b 100644 --- a/lib/commands/impl/commads_export.dart +++ b/lib/commands/impl/commads_export.dart @@ -8,7 +8,6 @@ export 'generate/locales/locales.dart'; export 'generate/model/model.dart'; export 'help/help.dart'; export 'init/flutter/init.dart'; -export 'install/install.dart'; export 'remove/remove.dart'; export 'sort/sort.dart'; export 'update/update.dart'; diff --git a/lib/commands/impl/install/install.dart b/lib/commands/impl/install/install.dart deleted file mode 100644 index c48e3855..00000000 --- a/lib/commands/impl/install/install.dart +++ /dev/null @@ -1,66 +0,0 @@ -import '../../../common/utils/logger/log_utils.dart'; -import '../../../common/utils/pubspec/pubspec_utils.dart'; -import '../../../common/utils/shell/shel.utils.dart'; -import '../../../core/internationalization.dart'; -import '../../../core/locales.g.dart'; -import '../../../exception_handler/exceptions/cli_exception.dart'; -import '../../interface/command.dart'; - -class InstallCommand extends Command { - @override - String get commandName => 'install'; - @override - List get alias => ['-i']; - @override - Future execute() async { - var isDev = containsArg('--dev') || containsArg('-dev'); - var runPubGet = false; - - for (var element in args) { - var packageInfo = element.split(':'); - LogService.info('Installing package "${packageInfo.first}" …'); - if (packageInfo.length == 1) { - runPubGet = await PubspecUtils.addDependencies(packageInfo.first, - isDev: isDev, runPubGet: false) - ? true - : runPubGet; - } else { - runPubGet = await PubspecUtils.addDependencies(packageInfo.first, - version: packageInfo[1], isDev: isDev, runPubGet: false) - ? true - : runPubGet; - ; - } - } - - if (runPubGet) await ShellUtils.pubGet(); - } - - @override - String? get hint => Translation(LocaleKeys.hint_install).tr; - - @override - bool validate() { - super.validate(); - - if (args.isEmpty) { - throw CliException( - 'Please, enter the name of a package you wanna install', - codeSample: codeSample); - } - return true; - } - - final String? codeSample1 = LogService.code('get install get:3.4.6'); - final String? codeSample2 = LogService.code('get install get'); - - @override - String get codeSample => ''' - $codeSample1 - if you wanna install the latest version: - $codeSample2 -'''; - - @override - int get maxParameters => 999; -}