How to use @statusfy/core - 2 common examples

To help you get started, we’ve selected a few @statusfy/core 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 bazzite / statusfy / packages / @statusfy / cli / index.js View on Github external
try {
  require.resolve('@statusfy/core')
} catch (err) {
  packageError('@statusfy/core')
  process.exit(1)
}

try {
  require.resolve('@statusfy/editor')
} catch (err) {
  packageError('@statusfy/editor')
  process.exit(1)
}

const pkg = require('@statusfy/core/package.json')
const requiredVersion = pkg.engines.node

if (!satisfies(process.version, requiredVersion)) {
  console.log(chalk.red(
    `Minimum Node version not met:\n` +
    `You are using Node ${process.version}, ` +
    `but Statusfy requires Node ${requiredVersion}.`
  ))
  console.log(chalk.red(`Please upgrade your Node version.`))

  process.exit(1)
}

const {
  init,
  dev,
  build,
github bazzite / statusfy / packages / @statusfy / cli / index.js View on Github external
}

const {
  init,
  dev,
  build,
  generate,
  start,
  newIncident,
  deleteIncident,
  updateIncident
} = require('@statusfy/core/lib')
const sourceDir = path.resolve('.')

program
  .version(pkg.version)
  .usage(' [options]')

program
  .command('init')
  .description('Create a base project')
  .option('-d, --dir ', 'specify the installation directory')
  .action(({ dir }) => {
    const outDir = dir ? path.resolve(dir) : null
    wrapCommand(init)(sourceDir, { outDir })
  })

program
  .command('dev')
  .description('Starts the application in development mode (hot-code reloading, error reporting, etc.).')
  .option('-p, --port ', 'use specified port (default: 3000)')
  .option('-s, --ssr', 'force SSR')

@statusfy/core

Core of Statusfy

Apache-2.0
Latest version published 5 years ago

Package Health Score

50 / 100
Full package analysis