How to use the @adonisjs/sink.LinesFile 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 / createEslint.ts View on Github external
const task: TaskFn = (absPath, _app, state) => {
  if (!state.eslint) {
    return
  }

  const eslint = new JsonFile(absPath, '.eslintrc.json')
  eslint.set('extends', ['plugin:adonis/typescriptApp'])
  eslint.commit()

  const eslintIgnore = new LinesFile(absPath, '.eslintignore')
  eslintIgnore.add('build')
  eslintIgnore.commit()

  logger.create('.eslintrc.json, .eslintignore')
}
github AdonisCommunity / create-adonis-ts-app / tasks / createGitIgnore.ts View on Github external
const task: TaskFn = (absPath) => {
  const gitignore = new LinesFile(absPath, '.gitignore')

  gitignore.add('node_modules')
  gitignore.add('build')
  gitignore.add('coverage')
  gitignore.add('.vscode')
  gitignore.add('.DS_STORE')
  gitignore.add('.env')

  gitignore.commit()
  logger.create('.gitignore')
}