UNPKG

@make-mjs/main

Version:
34 lines (23 loc) 654 B
# @make-mjs/main Main program ## APIs Documentation Go to [the GitHub page](https://ksxnodeapps.github.io/make-mjs/main) ## Usage ```typescript 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](https://git.io/JeY5b) © [Hoàng Văn Khải](https://github.com/KSXGitHub)