How to use the @adonisjs/sink.PackageFile function in @adonisjs/sink

To help you get started, we’ve selected a few @adonisjs/sink 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 AdonisCommunity / create-adonis-ts-app / tasks / createPackageFile.ts View on Github external
const task: TaskFn = async (absPath, _app, state) => {
  const pkg = new PackageFile(absPath)

  pkg.set('name', state.name)
  pkg.set('version', '0.0.0')
  pkg.set('private', true)

  pkg.setScript('build', 'node ace build')
  pkg.setScript('start', 'node ace serve --watch')

  /**
   * Set by `yarn create`
   */
  if (state.client === 'yarn') {
    pkg.yarn(true)
  }

  /**