项目作者: vladm3

项目描述 :
A Titanium CLI plugin to override or restrict Alloy version on a per-project basis
高级语言: JavaScript
项目地址: git://github.com/vladm3/vm.alloy-override.git
创建时间: 2017-07-29T13:22:59Z
项目社区:https://github.com/vladm3/vm.alloy-override

开源协议:MIT License

下载


npm

vm.alloy-override

A Titanium CLI plugin to override or restrict
Alloy version on a per project basis

The plugin locates the npm installed Alloy
package, either local (to your project) or global, and
overrides the env variable ALLOY_PATH.

Installation

Install Alloy

To make the plugin useful you need to install
the required Alloy version via npm.

Locally

  1. # latest
  2. npm install alloy --save-dev
  3. # specific version
  4. npm install alloy@1.10.3 --save-dev

Globally

  1. # latest
  2. npm install -g alloy
  3. # specific version
  4. npm install -g alloy@1.10.3

Install the plugin

Run this command in an Alloy project directory

  1. npm install vm.alloy-override --save-dev

The plugin will install itself to
your project’s local /plugins directory and
automatically enable itself in your tiapp.xml by
adding the following XML element to the <plugins></plugins> section:
<plugins></plugins> section:

  1. <plugins>
  2. <!-- other plugins... -->
  3. <plugin version="0.1.0">vm.alloy-override</plugin>
  4. </plugins>

Manual

At first, download the plugin.

Then place the plugin’s code in
your project’s local /plugins directory:

  1. ${project_dir}/plugins/vm.alloy-override/0.1.0/${plugin_files}

After that add the following XML element to the <plugins></plugins> section:

  1. <plugins>
  2. <!-- other plugins... -->
  3. <plugin version="0.1.0">vm.alloy-override</plugin>
  4. </plugins>

Example

See the example project ti.transform-example.

It restricts the app there to use Alloy 1.10.3.

License

MIT