Skip to content

Add warning that library add command will be removed in a future release #889

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

Merged
merged 1 commit into from
Sep 8, 2015
Merged
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
12 changes: 7 additions & 5 deletions docs/man_pages/lib-management/library-add.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,23 @@ General | `$ tns library add <Platform> <Library Path>`

Adds a locally stored native library to the current project. <% if(isHtml) { %>Copies the library files to the `lib/<platform>` folder in your project and configures the platform-specific projects in `platforms/<platform>` to work with the library. Build operations might perform additional configuration changes on the platform-specific project in `platforms/<platform>`.<% } %>

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

* `<Platform>` 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.<% } %>
* `<Library Path>` is the file path to a locally stored framework.<% if(isHtml) { %>
When you want to add an iOS framework, `<Library Path>` must be the complete file path to the `*.framework` file that you want to use.
When you want to add an Android framework, `<Library Path>` might be any of the following:
* `<Library Path>` is the file path to a locally stored framework.<% if(isHtml) { %>
When you want to add an iOS framework, `<Library Path>` must be the complete file path to the `*.framework` file that you want to use.
When you want to add an Android framework, `<Library Path>` 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.

Expand Down
4 changes: 3 additions & 1 deletion docs/man_pages/lib-management/library.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ General | `$ tns library <Command>`

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
`<Command>` 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
Expand Down
1 change: 1 addition & 0 deletions lib/commands/add-library.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export class AddLibraryCommand implements ICommand {

execute(args: string[]): IFuture<void> {
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();
Expand Down