feat: update ms system

This commit is contained in:
2020-09-17 17:44:48 +08:00
parent 7d6f6124b1
commit 8eaf789bce
23 changed files with 636 additions and 327 deletions

View File

@@ -2,9 +2,11 @@ import { plugin } from "@ccms/api"
import * as fs from '@ccms/common/dist/fs'
import { provideSingletonNamed } from "@ccms/container"
@provideSingletonNamed(plugin.PluginScanner, 'file')
const SCANNER_TYPE_NAME = 'file'
@provideSingletonNamed(plugin.PluginScanner, SCANNER_TYPE_NAME)
export class JSFileScanner implements plugin.PluginScanner {
type: string = 'file'
type: string = SCANNER_TYPE_NAME
scan(target: any): plugin.PluginLoadMetadata[] {
return this.scanFolder(fs.concat(root, target)).map((file) => this.read(file))