"use strict";
var PortFinder = require('portfinder');
var Command = require('../ember-cli/lib/models/command');
PortFinder.basePort = 49152;
var defaultPort = process.env.PORT || 4200;
var ServeCommand = Command.extend({
    name: 'serve',
    description: 'Builds and serves your app, rebuilding on file changes.',
    aliases: ['server', 's'],
    availableOptions: [
        { name: 'port', type: Number, default: defaultPort, aliases: ['p'] },
        {
            name: 'host',
            type: String,
            default: 'localhost',
            aliases: ['H'],
            description: 'Listens only on localhost by default'
        },
        { name: 'proxy-config', type: 'Path', aliases: ['pc'] },
        { name: 'watcher', type: String, default: 'events', aliases: ['w'] },
        { name: 'live-reload', type: Boolean, default: true, aliases: ['lr'] },
        {
            name: 'live-reload-host',
            type: String,
            aliases: ['lrh'],
            description: 'Defaults to host'
        },
        {
            name: 'live-reload-base-url',
            type: String,
            aliases: ['lrbu'],
            description: 'Defaults to baseURL'
        },
        {
            name: 'live-reload-port',
            type: Number,
            aliases: ['lrp'],
            description: '(Defaults to port number within [49152...65535])'
        },
        {
            name: 'live-reload-live-css',
            type: Boolean,
            default: true,
            description: 'Whether to live reload CSS (default true)'
        },
        {
            name: 'target',
            type: String,
            default: 'development',
            aliases: ['t', { 'dev': 'development' }, { 'prod': 'production' }]
        },
        { name: 'environment', type: String, default: '', aliases: ['e'] },
        { name: 'ssl', type: Boolean, default: false },
        { name: 'ssl-key', type: String, default: 'ssl/server.key' },
        { name: 'ssl-cert', type: String, default: 'ssl/server.crt' },
        { name: 'aot', type: Boolean, default: false },
        { name: 'sourcemap', type: Boolean, default: true, aliases: ['sm'] },
        { name: 'vendor-chunk', type: Boolean, default: true },
        { name: 'verbose', type: Boolean, default: false },
        { name: 'progress', type: Boolean, default: true },
        {
            name: 'open',
            type: Boolean,
            default: false,
            aliases: ['o'],
            description: 'Opens the url in default browser',
        },
        {
            name: 'hmr',
            type: Boolean,
            default: false,
            description: 'Enable hot module replacement',
        },
        { name: 'i18n-file', type: String, default: null },
        { name: 'i18n-format', type: String, default: null },
        { name: 'locale', type: String, default: null },
        { name: 'extract-css', type: Boolean, default: null }
    ],
    run: function (commandOptions) {
        return require('./serve.run').default.call(this, commandOptions);
    }
});
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = ServeCommand;
//# sourceMappingURL=/Users/hansl/Sources/angular-cli/packages/angular-cli/commands/serve.js.map