How to use @architect/utils - 6 common examples

To help you get started, we’ve selected a few @architect/utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github architect / architect / src / before / 01-ensure-creds.js View on Github external
module.exports = function ensureCreds() {

  try {
    readArc()
  }
  catch(e) {
    if (e.message === 'not_found') {
  console.log(chalk.grey('.------------------------------.'))
  console.log(chalk.grey('|'), chalk.bold.yellow('Warning'), chalk.yellow('.arc file not found!'), chalk.grey('|'))
  console.log(chalk.grey('|'), chalk.grey('Generate by running'), chalk.bold.green('arc init'), chalk.grey('|'))
  console.log(chalk.grey('\'------------------------------\''))
    }
  }

  // always ensure NODE_ENV
  if (!process.env.NODE_ENV)
    process.env.NODE_ENV = 'testing'

  // always ensure AWS_REGION
  if (!process.env.AWS_REGION)
github architect / architect / src / before / 01-ensure-creds.js View on Github external
console.log(chalk.grey('.------------------------------.'))
  console.log(chalk.grey('|'), chalk.bold.yellow('Warning'), chalk.yellow('.arc file not found!'), chalk.grey('|'))
  console.log(chalk.grey('|'), chalk.grey('Generate by running'), chalk.bold.green('arc init'), chalk.grey('|'))
  console.log(chalk.grey('\'------------------------------\''))
    }
  }

  // always ensure NODE_ENV
  if (!process.env.NODE_ENV)
    process.env.NODE_ENV = 'testing'

  // always ensure AWS_REGION
  if (!process.env.AWS_REGION)
    process.env.AWS_REGION = 'us-west-2'

  initAWS() // Load AWS creds
}
github architect / architect / src / before / 02-maybe-banner.js View on Github external
module.exports = function maybeBanner() {
  let version = `Architect ${ver}`
  try {
    utils.readArc()
    utils.banner({version})
    if (process.env.INITIALIZED) {
      let update = utils.updater('Create')
      update.done('Created Architect project manifest (.arc)')
    }
  }
  catch(e) {
    console.log(e)
  }
}
github architect / architect / src / before / 02-maybe-banner.js View on Github external
module.exports = function maybeBanner() {
  let version = `Architect ${ver}`
  try {
    utils.readArc()
    utils.banner({version})
    if (process.env.INITIALIZED) {
      let update = utils.updater('Create')
      update.done('Created Architect project manifest (.arc)')
    }
  }
  catch(e) {
    console.log(e)
  }
}
github architect / architect / src / before / 02-maybe-banner.js View on Github external
module.exports = function maybeBanner() {
  let version = `Architect ${ver}`
  try {
    utils.readArc()
    utils.banner({version})
    if (process.env.INITIALIZED) {
      let update = utils.updater('Create')
      update.done('Created Architect project manifest (.arc)')
    }
  }
  catch(e) {
    console.log(e)
  }
}
github architect / architect / src / deploy / public / _publish-to-s3.js View on Github external
function writeStaticManifest(callback) {
      fingerprinter({fingerprint, ignore}, callback)
    },

@architect/utils

Common utility functions

Apache-2.0
Latest version published 29 days ago

Package Health Score

79 / 100
Full package analysis