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