0.0.1-beta.0 • Published 6 years ago
file-list-loader v0.0.1-beta.0
file-list-loader
A file loader that after searched in a path (or paths) recursively, generate an ID for each file based in the name.
Installation
Install by npm
npm install --save file-list-loaderBasic Usage
/
└── Users
└── jsons
├── unicorn.json
└── foo
└── bar
├── baz
└── one.jsonimport {MikroOrmModuleDefiner} from "file-list-loader";
const loader = new FileListLoader({
extensions: ['json'],
useFilePathInId: false
});
await loader.addPaths({path: './jsons'});
const oneContent = await loader.getFileContent('one');
const unicornContent = await loader.getFileContent('unicorn');Commands
npm run build: Build the project (file list loader).npm run build:clean: Delete first the dist folder and build it.npm run clean: Delete the dist folder.npm run test: Execute the tests.npm run test:coverage: Execute the tests and calculate the coverage.npm run lint: Check the code using the rules in .eslintre.jsnpm run lint:fix: Check the code and try to fix it.
License
MIT