From fc8c05ecadedbe45223660a32bf97d2d04aae420 Mon Sep 17 00:00:00 2001 From: TsvetanMilanov Date: Tue, 22 Mar 2016 17:47:32 +0200 Subject: [PATCH 1/2] Simplified creating angular template project Added angular and ng values for --template option which will use https://github.com/NativeScript/template-hello-world-ng. Added --ng option in the create command which is equal to --template ng and --template angular. Added unit tests. Fix copying hidden files when creating project. --- docs/man_pages/project/creation/create.md | 4 +- lib/commands/create-project.ts | 12 ++- lib/constants.ts | 2 + lib/declarations.ts | 39 ++++---- lib/npm-installation-manager.ts | 3 +- lib/options.ts | 3 +- lib/services/project-service.ts | 2 + lib/services/project-templates-service.ts | 4 +- test/project-commands.ts | 114 ++++++++++++++++++++++ test/project-service.ts | 26 +++++ 10 files changed, 185 insertions(+), 24 deletions(-) create mode 100644 test/project-commands.ts diff --git a/docs/man_pages/project/creation/create.md b/docs/man_pages/project/creation/create.md index 90379eef9b..e3910f5cef 100644 --- a/docs/man_pages/project/creation/create.md +++ b/docs/man_pages/project/creation/create.md @@ -4,7 +4,8 @@ create Usage | Synopsis ---|--- Create from default JavaScript template | `$ tns create [--path ] [--appid ]` -Create from default TypeScript template | `$ tns create [--path ] [--appid --template typescript` OR `$ tns create [--path ] [--appid --template tsc` +Create from default TypeScript template | `$ tns create --template typescript [--path ] [--appid ]` OR `$ tns create --template tsc [--path ] [--appid ]` +Create from default Angular template | `$ tns create --template angular [--path ] [--appid ]` OR `$ tns create --template ng [--path ] [--appid ]` OR `$ tns create --ng [--path ] [--appid ]` Copy from existing project | `$ tns create [--path ] [--appid ] --copy-from ` Create from custom template | `$ tns create [--path ] [--appid ] --template