@make-mjs/main
TypeScript icon, indicating that this package has built-in type declarations

0.4.9 • Public • Published

@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

Package Sidebar

Install

npm i @make-mjs/main

Weekly Downloads

1

Version

0.4.9

License

MIT

Unpacked Size

17.3 kB

Total Files

30

Last publish

Collaborators

  • khai96_