alloy-npm
v0.0.2-beta.1
Published
Alloy+ plugin for executing npm during build process
Downloads
9
Maintainers
Readme
CAUTION: PRE-PRODUCTION BETA
alloy-npm
Overview
Why should I use this plugin?
alloy-npm is an Alloy+ Plugin for executing npm during the Appelerator Alloy build process
What is Alloy+?
Alloy+ is an entire framework built around Appcelerator Mobile and their Alloy product. The idea for this framework was built upon the concepts of MobileHero Adamantium and a desire to customize and extend Appcelerator Alloy for developers. How much faster or stronger all depends on YOU, the developer.
There will be an assortment of alloy+ plugins (available as npm modules) that you can install in your project to help you take your existing development tools furthur
than possible today. You can choose which modules are executed in your config.json
file (which is part of your Alloy project). You can also easily create your own plugins by simply creating a npm module that follows a simple convention.
Install
Install in the root directory of your Appcelerator mobile project (the directory containing
tiapp.xml
).
npm install --save alloy-npm
Usage
To use this installed plugin in your app, merge the following to your app's config.json
file:
{
"global": {
"tasks": {
"preload": [ "@mobile/alloy-npm" ]
}
}
By default, the command will run npm install
in the lib
directory of your Appcelerator project.
To run a different command, simply change the reference to this module in your config.json
file to the desired command.
The first argument to the plugin will need to be the directory location that you want this run in.
You will have some Alloy objects available for use as templated code.
Most often, you will probably want to run these in the
preload
stage of the Alloy build process so that any changes done by this plugin can get picked up before copying files over to the build folder.
Examples
Install packages in lib directory
"preload": [ "@mobile/alloy-npm" ]
Update packages in lib directory
"preload": [ "@mobile/alloy-npm ${event.dir.lib} update" ]
Install bluebird
package in lib directory
"preload": [ "@mobile/alloy-npm ${event.dir.lib} install @mobile/bluebird" ]
Other Alloy+ Plugins
** Coming Soon! :mega: **
underscore
: Fix some issues with the usage of underscore in Alloy and allow upgrading to lodashbabel
: Run babel transformations on your code during the build processes6
: Use ES6/ES2015 code in your apps via babel transformations!nodejs
: Makerequire
statements in your app support nodejs packages installed via npm
You can also search for more plugins developed by the community.
Need Help?
Please submit an issue on GitHub and provide information about your setup.
License
This project is licensed under the terms of the MIT license. See the license.md file. This means you have full access to the source code and can modify it to fit your own needs.
Legal
Superhero Studios Incorporated and this project are in no way affiliated with any of the following companies:
- Appcelerator, Inc
- Axway Inc
- Apple Inc
- Google Inc
Alloy is developed by Appcelerator and the community and is Copyright (c) 2012 by Appcelerator, Inc. All Rights Reserved. Alloy is made available under the Apache Public License, version 2. See their LICENSE file for more information.