@adonisjs/sink
A collection of utilities for creating AdonisJs packages and boilerplates.
AdonisJs sink is a collection of file utilities to mutate the contents of a file with support for partial updates, automatic commits and rollbacks.
Table of contents
Usage
Install the package from npm as follows:
npm i @adonisjs/sink
yarn add @adonisjs/sink
and then use it as follows:
import { PackageFile } from '@adonisjs/sink'
const pkg = new PackageFile(process.cwd())
pkg.setScript('build', 'tsc')
pkg.install(['typescript', 'tslint'])
pkg.commit()
You will use this package when creating your own boilerplates for AdonisJs or when you want to run instructions using instructions.ts
file.
In both the places, you will get the basePath
of the application from AdonisJs itself.
Maintainers
Harminder virk