Miss any of our Open RFC calls?Watch the recordings here! »

@make-mjs/main

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

Install

npm i @make-mjs/main

DownloadsWeekly Downloads

19

Version

0.4.9

License

MIT

Unpacked Size

17.3 kB

Total Files

30

Last publish

Collaborators

  • avatar