Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@make-mjs/main

ksxnodeapps113MIT0.4.9TypeScript support: included

Main program

es-module, babel, import, esm, mjs

readme

@make-mjs/main

Main program

APIs Documentation

Go to the GitHub page

Usage

import main, { EventType } from '@make-mjs/main'

// main() returns an async iterator
const events = main({
  dirname: 'src',
  /* ...and more options... */
})

for await (const event of events) {
  if (event.type === EventType.BeforeWrite) {
    console.log('Writing to file:', event.file.path)
  }

  if (event.type === EventType.AfterWrite) {
    console.log('Complete writing:', event.file.path)
  }
}

License

MIT © Hoàng Văn Khải