fix(core): update

This commit is contained in:
Philipp Kunz 2019-04-08 16:39:41 +02:00
parent 77c88f09cd
commit 4c23992681
6 changed files with 32 additions and 40 deletions

View File

@ -37,18 +37,6 @@ snyk:
# ====================
# test stage
# ====================
testLEGACY:
stage: test
script:
- npmci npm prepare
- npmci node install legacy
- npmci npm install
- npmci npm test
coverage: /\d+.?\d+?\%\s*coverage/
tags:
- docker
- notpriv
allow_failure: true
testLTS:
stage: test

View File

@ -1,24 +1,20 @@
# @pushrocks/smartfile
smart ways to work with files in nodejs
make files easily accessible for processing in javascript.
## Availabililty
[![npm](https://pushrocks.gitlab.io/assets/repo-button-npm.svg)](https://www.npmjs.com/package/smartfile)
[![git](https://pushrocks.gitlab.io/assets/repo-button-git.svg)](https://gitlab.com/pushrocks/smartfile)
[![git](https://pushrocks.gitlab.io/assets/repo-button-mirror.svg)](https://github.com/pushrocks/smartfile)
[![docs](https://pushrocks.gitlab.io/assets/repo-button-docs.svg)](https://pushrocks.gitlab.io/smartfile/)
## Availabililty and Links
* [npmjs.org (npm package)](https://www.npmjs.com/package/@pushrocks/smartfile)
* [gitlab.com (source)](https://gitlab.com/pushrocks/smartfile)
* [github.com (source mirror)](https://github.com/pushrocks/smartfile)
* [docs (typedoc)](https://pushrocks.gitlab.io/smartfile/)
## Status for master
[![build status](https://gitlab.com/pushrocks/smartfile/badges/master/build.svg)](https://gitlab.com/pushrocks/smartfile/commits/master)
[![coverage report](https://gitlab.com/pushrocks/smartfile/badges/master/coverage.svg)](https://gitlab.com/pushrocks/smartfile/commits/master)
[![Dependency Status](https://david-dm.org/pushrocks/smartfile.svg)](https://david-dm.org/pushrocks/smartfile)
[![bitHound Dependencies](https://www.bithound.io/github/pushrocks/smartfile/badges/dependencies.svg)](https://www.bithound.io/github/pushrocks/smartfile/master/dependencies/npm)
[![bitHound Code](https://www.bithound.io/github/pushrocks/smartfile/badges/code.svg)](https://www.bithound.io/github/pushrocks/smartfile)
[![TypeScript](https://img.shields.io/badge/TypeScript-2.x-blue.svg)](https://nodejs.org/dist/latest-v6.x/docs/api/)
[![node](https://img.shields.io/badge/node->=%206.x.x-blue.svg)](https://nodejs.org/dist/latest-v6.x/docs/api/)
[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)
[![npm downloads per month](https://img.shields.io/npm/dm/@pushrocks/smartfile.svg)](https://www.npmjs.com/package/@pushrocks/smartfile)
[![Known Vulnerabilities](https://snyk.io/test/npm/@pushrocks/smartfile/badge.svg)](https://snyk.io/test/npm/@pushrocks/smartfile)
[![TypeScript](https://img.shields.io/badge/TypeScript->=%203.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
[![node](https://img.shields.io/badge/node->=%2010.x.x-blue.svg)](https://nodejs.org/dist/latest-v10.x/docs/api/)
[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-prettier-ff69b4.svg)](https://prettier.io/)
## Usage
@ -36,8 +32,9 @@ smartfile thinks in sections:
| interpreter | (object) handles yaml and json |
| smartfile | (class) a virtual representation of a file, alternative to vinyl file format |
For further information read the linked docs at the top of this README.
For further information read the linked docs at the top of this readme.
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
[![npm](https://pushrocks.gitlab.io/assets/repo-footer.svg)](https://push.rocks)
[![repo-footer](https://pushrocks.gitlab.io/assets/repo-footer.svg)](https://maintainedby.lossless.com)

View File

@ -1,13 +1,21 @@
{
"npmts":{
"mode":"default",
"coverageTreshold":70
},
"npmdocker":{
"npmts": {
"mode": "default",
"coverageTreshold": 70
},
"npmdocker": {},
"npmci": {
"npmGlobalTools": [],
"npmAccessLevel": "public"
},
"gitzone": {
"module": {
"githost": "gitlab.com",
"gitscope": "pushrocks",
"gitrepo": "smartfile",
"shortDescription": "smart ways to work with files in nodejs",
"npmPackagename": "@pushrocks/smartfile",
"license": "MIT"
}
}
}

View File

@ -22,7 +22,7 @@ export class Smartfile {
* creates a Smartfile from a filePath
* @param filePath
*/
public static async fromFilePath (filePath: string) {
public static async fromFilePath(filePath: string) {
filePath = plugins.path.resolve(filePath);
const fileString = fs.toStringSync(filePath);
const smartfile = new Smartfile({
@ -32,7 +32,6 @@ export class Smartfile {
return smartfile;
}
// ========
// INSTANCE
// ========

View File

@ -266,7 +266,7 @@ export let listFolders = async (pathArg: string, regexFilter?: RegExp): Promise<
* @returns an array with the folder names as strings
*/
export let listFoldersSync = (pathArg: string, regexFilter?: RegExp): string[] => {
let folderArray = plugins.fsExtra.readdirSync(pathArg).filter((file) => {
let folderArray = plugins.fsExtra.readdirSync(pathArg).filter(file => {
return plugins.fsExtra.statSync(plugins.path.join(pathArg, file)).isDirectory();
});
if (regexFilter) {