@ngneat/aim-to-standalone
Advanced tools
Comparing version 1.0.0-beta.0 to 1.0.0-beta.1
@@ -45,3 +45,3 @@ "use strict"; | ||
function refactorToAim(aimModules, moduleRefs) { | ||
var _a, _b, _c, _d; | ||
var _a, _b, _c, _d, _e, _f; | ||
function checkIsPureAim(refs) { | ||
@@ -81,9 +81,10 @@ var _a; | ||
// It could have multiple decorators so we need to find the right one | ||
const relatedClassDec = aimModule.sourceFile | ||
const relatedClassDec = (_d = (_c = aimModule.sourceFile | ||
.getClasses() | ||
.find((d) => d.getName() === relatedClassName) | ||
.getDecorators() | ||
.find((d) => { | ||
.find((d) => d.getName() === relatedClassName)) === null || _c === void 0 ? void 0 : _c.getDecorators()) === null || _d === void 0 ? void 0 : _d.find((d) => { | ||
return d.getName().match(/Directive|Component|Pipe/); | ||
}); | ||
if (!relatedClassDec) { | ||
return; | ||
} | ||
const relatedClassDecoratorArgs = relatedClassDec.getArguments()[0]; | ||
@@ -123,4 +124,4 @@ relatedClassDecoratorArgs.addPropertyAssignment({ | ||
// Remove `NgModule` from imports | ||
(_d = (_c = aimModule.sourceFile | ||
.getImportDeclaration('@angular/core')) === null || _c === void 0 ? void 0 : _c.getNamedImports().find((i) => i.getName() === 'NgModule')) === null || _d === void 0 ? void 0 : _d.remove(); | ||
(_f = (_e = aimModule.sourceFile | ||
.getImportDeclaration('@angular/core')) === null || _e === void 0 ? void 0 : _e.getNamedImports().find((i) => i.getName() === 'NgModule')) === null || _f === void 0 ? void 0 : _f.remove(); | ||
} | ||
@@ -127,0 +128,0 @@ } |
@@ -1,1 +0,1 @@ | ||
{"version":"1.0.0-beta.0","commands":{"start":{"id":"start","strict":true,"pluginName":"@ngneat/aim-to-standalone","pluginAlias":"@ngneat/aim-to-standalone","pluginType":"core","aliases":[],"flags":{},"args":[]}}} | ||
{"version":"1.0.0-beta.1","commands":{"start":{"id":"start","strict":true,"pluginName":"@ngneat/aim-to-standalone","pluginAlias":"@ngneat/aim-to-standalone","pluginType":"core","aliases":[],"flags":{},"args":[]}}} |
{ | ||
"name": "@ngneat/aim-to-standalone", | ||
"version": "1.0.0-beta.0", | ||
"version": "1.0.0-beta.1", | ||
"description": "Convert AIM to standalone", | ||
@@ -5,0 +5,0 @@ "author": "Netanel Basal @NetanelBasal", |
301
README.md
@@ -1,302 +0,7 @@ | ||
oclif-hello-world | ||
================= | ||
## AIM to Standalone | ||
oclif example Hello World CLI | ||
Converts Angular Inline Modules to standalone. | ||
[](https://oclif.io) | ||
[](https://npmjs.org/package/oclif-hello-world) | ||
[](https://circleci.com/gh/oclif/hello-world/tree/main) | ||
[](https://npmjs.org/package/oclif-hello-world) | ||
[](https://github.com/oclif/hello-world/blob/main/package.json) | ||
<!-- toc --> | ||
* [Usage](#usage) | ||
* [Commands](#commands) | ||
<!-- tocstop --> | ||
# Usage | ||
<!-- usage --> | ||
```sh-session | ||
$ npm install -g @ngneat/aim-to-standalone | ||
$ aim-to-standalone COMMAND | ||
running command... | ||
$ aim-to-standalone (--version) | ||
@ngneat/aim-to-standalone/1.0.0-beta.0 darwin-x64 node-v16.15.0 | ||
$ aim-to-standalone --help [COMMAND] | ||
USAGE | ||
$ aim-to-standalone COMMAND | ||
... | ||
``` | ||
<!-- usagestop --> | ||
# Commands | ||
<!-- commands --> | ||
* [`aim-to-standalone help [COMMAND]`](#aim-to-standalone-help-command) | ||
* [`aim-to-standalone plugins`](#aim-to-standalone-plugins) | ||
* [`aim-to-standalone plugins:install PLUGIN...`](#aim-to-standalone-pluginsinstall-plugin) | ||
* [`aim-to-standalone plugins:inspect PLUGIN...`](#aim-to-standalone-pluginsinspect-plugin) | ||
* [`aim-to-standalone plugins:install PLUGIN...`](#aim-to-standalone-pluginsinstall-plugin-1) | ||
* [`aim-to-standalone plugins:link PLUGIN`](#aim-to-standalone-pluginslink-plugin) | ||
* [`aim-to-standalone plugins:uninstall PLUGIN...`](#aim-to-standalone-pluginsuninstall-plugin) | ||
* [`aim-to-standalone plugins:uninstall PLUGIN...`](#aim-to-standalone-pluginsuninstall-plugin-1) | ||
* [`aim-to-standalone plugins:uninstall PLUGIN...`](#aim-to-standalone-pluginsuninstall-plugin-2) | ||
* [`aim-to-standalone plugins update`](#aim-to-standalone-plugins-update) | ||
* [`aim-to-standalone start`](#aim-to-standalone-start) | ||
## `aim-to-standalone help [COMMAND]` | ||
Display help for aim-to-standalone. | ||
npx @ngneat/aim-to-standalone start | ||
``` | ||
USAGE | ||
$ aim-to-standalone help [COMMAND] [-n] | ||
ARGUMENTS | ||
COMMAND Command to show help for. | ||
FLAGS | ||
-n, --nested-commands Include all nested commands in the output. | ||
DESCRIPTION | ||
Display help for aim-to-standalone. | ||
``` | ||
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v5.1.12/src/commands/help.ts)_ | ||
## `aim-to-standalone plugins` | ||
List installed plugins. | ||
``` | ||
USAGE | ||
$ aim-to-standalone plugins [--core] | ||
FLAGS | ||
--core Show core plugins. | ||
DESCRIPTION | ||
List installed plugins. | ||
EXAMPLES | ||
$ aim-to-standalone plugins | ||
``` | ||
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v2.0.11/src/commands/plugins/index.ts)_ | ||
## `aim-to-standalone plugins:install PLUGIN...` | ||
Installs a plugin into the CLI. | ||
``` | ||
USAGE | ||
$ aim-to-standalone plugins:install PLUGIN... | ||
ARGUMENTS | ||
PLUGIN Plugin to install. | ||
FLAGS | ||
-f, --force Run yarn install with force flag. | ||
-h, --help Show CLI help. | ||
-v, --verbose | ||
DESCRIPTION | ||
Installs a plugin into the CLI. | ||
Can be installed from npm or a git url. | ||
Installation of a user-installed plugin will override a core plugin. | ||
e.g. If you have a core plugin that has a 'hello' command, installing a user-installed plugin with a 'hello' command | ||
will override the core plugin implementation. This is useful if a user needs to update core plugin functionality in | ||
the CLI without the need to patch and update the whole CLI. | ||
ALIASES | ||
$ aim-to-standalone plugins add | ||
EXAMPLES | ||
$ aim-to-standalone plugins:install myplugin | ||
$ aim-to-standalone plugins:install https://github.com/someuser/someplugin | ||
$ aim-to-standalone plugins:install someuser/someplugin | ||
``` | ||
## `aim-to-standalone plugins:inspect PLUGIN...` | ||
Displays installation properties of a plugin. | ||
``` | ||
USAGE | ||
$ aim-to-standalone plugins:inspect PLUGIN... | ||
ARGUMENTS | ||
PLUGIN [default: .] Plugin to inspect. | ||
FLAGS | ||
-h, --help Show CLI help. | ||
-v, --verbose | ||
DESCRIPTION | ||
Displays installation properties of a plugin. | ||
EXAMPLES | ||
$ aim-to-standalone plugins:inspect myplugin | ||
``` | ||
## `aim-to-standalone plugins:install PLUGIN...` | ||
Installs a plugin into the CLI. | ||
``` | ||
USAGE | ||
$ aim-to-standalone plugins:install PLUGIN... | ||
ARGUMENTS | ||
PLUGIN Plugin to install. | ||
FLAGS | ||
-f, --force Run yarn install with force flag. | ||
-h, --help Show CLI help. | ||
-v, --verbose | ||
DESCRIPTION | ||
Installs a plugin into the CLI. | ||
Can be installed from npm or a git url. | ||
Installation of a user-installed plugin will override a core plugin. | ||
e.g. If you have a core plugin that has a 'hello' command, installing a user-installed plugin with a 'hello' command | ||
will override the core plugin implementation. This is useful if a user needs to update core plugin functionality in | ||
the CLI without the need to patch and update the whole CLI. | ||
ALIASES | ||
$ aim-to-standalone plugins add | ||
EXAMPLES | ||
$ aim-to-standalone plugins:install myplugin | ||
$ aim-to-standalone plugins:install https://github.com/someuser/someplugin | ||
$ aim-to-standalone plugins:install someuser/someplugin | ||
``` | ||
## `aim-to-standalone plugins:link PLUGIN` | ||
Links a plugin into the CLI for development. | ||
``` | ||
USAGE | ||
$ aim-to-standalone plugins:link PLUGIN | ||
ARGUMENTS | ||
PATH [default: .] path to plugin | ||
FLAGS | ||
-h, --help Show CLI help. | ||
-v, --verbose | ||
DESCRIPTION | ||
Links a plugin into the CLI for development. | ||
Installation of a linked plugin will override a user-installed or core plugin. | ||
e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello' | ||
command will override the user-installed or core plugin implementation. This is useful for development work. | ||
EXAMPLES | ||
$ aim-to-standalone plugins:link myplugin | ||
``` | ||
## `aim-to-standalone plugins:uninstall PLUGIN...` | ||
Removes a plugin from the CLI. | ||
``` | ||
USAGE | ||
$ aim-to-standalone plugins:uninstall PLUGIN... | ||
ARGUMENTS | ||
PLUGIN plugin to uninstall | ||
FLAGS | ||
-h, --help Show CLI help. | ||
-v, --verbose | ||
DESCRIPTION | ||
Removes a plugin from the CLI. | ||
ALIASES | ||
$ aim-to-standalone plugins unlink | ||
$ aim-to-standalone plugins remove | ||
``` | ||
## `aim-to-standalone plugins:uninstall PLUGIN...` | ||
Removes a plugin from the CLI. | ||
``` | ||
USAGE | ||
$ aim-to-standalone plugins:uninstall PLUGIN... | ||
ARGUMENTS | ||
PLUGIN plugin to uninstall | ||
FLAGS | ||
-h, --help Show CLI help. | ||
-v, --verbose | ||
DESCRIPTION | ||
Removes a plugin from the CLI. | ||
ALIASES | ||
$ aim-to-standalone plugins unlink | ||
$ aim-to-standalone plugins remove | ||
``` | ||
## `aim-to-standalone plugins:uninstall PLUGIN...` | ||
Removes a plugin from the CLI. | ||
``` | ||
USAGE | ||
$ aim-to-standalone plugins:uninstall PLUGIN... | ||
ARGUMENTS | ||
PLUGIN plugin to uninstall | ||
FLAGS | ||
-h, --help Show CLI help. | ||
-v, --verbose | ||
DESCRIPTION | ||
Removes a plugin from the CLI. | ||
ALIASES | ||
$ aim-to-standalone plugins unlink | ||
$ aim-to-standalone plugins remove | ||
``` | ||
## `aim-to-standalone plugins update` | ||
Update installed plugins. | ||
``` | ||
USAGE | ||
$ aim-to-standalone plugins update [-h] [-v] | ||
FLAGS | ||
-h, --help Show CLI help. | ||
-v, --verbose | ||
DESCRIPTION | ||
Update installed plugins. | ||
``` | ||
## `aim-to-standalone start` | ||
``` | ||
USAGE | ||
$ aim-to-standalone start | ||
``` | ||
_See code: [dist/commands/start/index.ts](https://github.com/ngneat/aim/https://github.com/ngneat/aim/blob/v1.0.0-beta.0/dist/commands/start/index.ts)_ | ||
<!-- commandsstop --> |
637
27943
8