#!/usr/bin/env node

import * as path from 'path';
import {Minifier} from 'ionic-minify';

let config: IMConfig = require("../minify-conf.json");
let cmd: string         = process.env.CORDOVA_CMDLINE;
let rootDir: string     = process.argv[2];
let minify: boolean     = config.alwaysRun || (cmd.indexOf("--release") > -1);
let platforms: string[] = process.env.CORDOVA_PLATFORMS.split(',');
let platformPath: string= path.join(rootDir, "platforms");

config.showErrStack = (config.showErrStack || false);
config.jsOptions.fromString = true;

let ionicMinify: Minifier = new Minifier(config, platforms, platformPath);

if (minify) {
  console.log("Starting minifying your files...");
  ionicMinify.run();
}
#!/usr/bin/env node

import * as path from 'path';
import {Minifier} from 'ionic-minify';

let config: IMConfig = require("../minify-conf.json");
let cmd: string         = process.env.CORDOVA_CMDLINE;
let rootDir: string     = process.argv[2];
let minify: boolean     = config.alwaysRun || (cmd.indexOf("--minify") > -1);
let platforms: string[] = process.env.CORDOVA_PLATFORMS.split(',');
let platformPath: string= path.join(rootDir, "platforms");

config.showErrStack = (config.showErrStack || false);
config.jsOptions.fromString = true;

let ionicMinify: Minifier = new Minifier(config, platforms, platformPath);

if (minify) {
  console.log("Starting minifying your files...");
  ionicMinify.run();
}
Change trigger flag to --minify
Change trigger flag to --minify

- --release flag was breaking the android build in latest build tools
  so it's now replaced by the --minify flag.

See #13 for more information.
Thanks to @aaronksaunders for spotting this.
