From c2c6ce6c3858be14b3d815798f3d839f139124f5 Mon Sep 17 00:00:00 2001 From: Fatme Havaluova Date: Tue, 8 Sep 2015 12:56:22 +0300 Subject: [PATCH] Add warning that library add command will be removed in a future release. --- docs/man_pages/lib-management/library-add.md | 12 +++++++----- docs/man_pages/lib-management/library.md | 4 +++- lib/commands/add-library.ts | 1 + 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/docs/man_pages/lib-management/library-add.md b/docs/man_pages/lib-management/library-add.md index a626e478b7..8381a31a3c 100644 --- a/docs/man_pages/lib-management/library-add.md +++ b/docs/man_pages/lib-management/library-add.md @@ -7,21 +7,23 @@ General | `$ tns library add ` Adds a locally stored native library to the current project. <% if(isHtml) { %>Copies the library files to the `lib/` folder in your project and configures the platform-specific projects in `platforms/` to work with the library. Build operations might perform additional configuration changes on the platform-specific project in `platforms/`.<% } %> +IMPORTANT: The `tns library add` command is deprecated and will be removed in a future release. Use the `tns plugin` set of commands instead. For more information, <% if(isHtml) { %>see the [plugin](plugin.html) set of commands.<% } %><% if(isConsole) { %>run `tns help plugin`.<% } %>. + IMPORTANT: When adding frameworks, keep in mind the following behaviors. * Any functionality exposed by the library will become available in the built application package. * The first build operation after you run this command is significantly slower. -<% if(isMacOS) { %>* When you add an iOS framework, the NativeScript CLI automatically changes your build target to iOS 8.0.<% } %> +<% if(isMacOS) { %>* When you add an iOS framework, the NativeScript CLI automatically changes your build target to iOS 8.0.<% } %> ### Attributes * `` is the target mobile platform for which you want to add a native library. You can set the following target platforms. * `android` - Adds an Android native library. <% if(isMacOS) { %>* `ios` - Adds an iOS native library.<% } %> -* `` is the file path to a locally stored framework.<% if(isHtml) { %> - When you want to add an iOS framework, `` must be the complete file path to the `*.framework` file that you want to use. - When you want to add an Android framework, `` might be any of the following: - +* `` is the file path to a locally stored framework.<% if(isHtml) { %> + When you want to add an iOS framework, `` must be the complete file path to the `*.framework` file that you want to use. + When you want to add an Android framework, `` might be any of the following: + * The file path to a directory containing one or more `*.jar` files. * The file path to a directory containing the `project.properties` files for an Android library project created with Eclipse. diff --git a/docs/man_pages/lib-management/library.md b/docs/man_pages/lib-management/library.md index 3e7fffd82c..756c69883d 100644 --- a/docs/man_pages/lib-management/library.md +++ b/docs/man_pages/lib-management/library.md @@ -7,11 +7,13 @@ General | `$ tns library ` Lets you manage third-party native libraries in your project. You must run the `library` command with a command extension. +IMPORTANT: The `tns library` command is deprecated and will be removed in a future release. Use the `tns plugin` set of commands instead. For more information, <% if(isHtml) { %>see the [plugin](plugin.html) set of commands.<% } %><% if(isConsole) { %>run `tns help plugin`.<% } %>. + ### Attributes `` extends the `library` command. You can set the following values for this attribute. * `add` - Adds a locally stored native library to the current project. -<% if(isHtml) { %> +<% if(isHtml) { %> ### Related Commands Command | Description diff --git a/lib/commands/add-library.ts b/lib/commands/add-library.ts index 002e16e0a6..dbbba9021f 100644 --- a/lib/commands/add-library.ts +++ b/lib/commands/add-library.ts @@ -13,6 +13,7 @@ export class AddLibraryCommand implements ICommand { execute(args: string[]): IFuture { return (() => { + this.$logger.warn("IMPORTANT: The `tns library add` command is deprecated and will be removed in a future release. Use the plugin set of commands instead. For more information, run `tns help plugin`."); let platform = args[0]; let libraryPath = path.resolve(args[1]); this.$platformService.addLibrary(platform, libraryPath).wait();