Skip to content

Allow to define environments which are used in tasks #8

@maxklenk

Description

@maxklenk

I use these environments which allow me to execute the same task with different environments to deploy or build the application.

var environments = {
  development: {
    rev: false,
    deployBranch: false,
    constants: {
      ENV: {
        name: 'development',
        html5Mode: true,
        apiEndpoint: 'local.server'
      }
    }
  },
  testing: {
    rev: true,
    deployBranch: 'deploy/test',
    constants: {
      ENV: {
        name: 'testing',
        html5Mode: true,
        apiEndpoint: 'test.server'
      }
    }
  },
  production: {
    rev: true,
    deployBranch: 'deploy/production',
    constants: {
      ENV: {
        name: 'production',
        html5Mode: true,
        apiEndpoint: 'server'
      }
    }
  }


// ENVIRONMENT FLAG
var env = environments.development;
for (var index in environments) {
  if (!!argv[index]) {
    env = environments[index];
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions