fix(core): update

This commit is contained in:
Philipp Kunz 2020-02-25 19:02:52 +00:00
parent 385285d897
commit 7d240b3461
5 changed files with 32 additions and 5 deletions

5
package-lock.json generated
View File

@ -1256,6 +1256,11 @@
"integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=",
"dev": true
},
"picomatch": {
"version": "2.2.1",
"resolved": "https://verdaccio.lossless.one/picomatch/-/picomatch-2.2.1.tgz",
"integrity": "sha512-ISBaA8xQNmwELC7eOjqFKMESB2VIqt4PPDD0nsS95b/9dZXvVKOlz9keMSnoGGKcOHXfTvDD6WMaRoSc9UuhRA=="
},
"pump": {
"version": "3.0.0",
"resolved": "https://verdaccio.lossless.one/pump/-/pump-3.0.0.tgz",

View File

@ -20,7 +20,9 @@
"tslint": "^5.11.0",
"tslint-config-prettier": "^1.15.0"
},
"dependencies": {},
"dependencies": {
"picomatch": "^2.2.1"
},
"files": [
"ts/**/*",
"ts_web/**/*",

View File

@ -2,7 +2,12 @@ import { expect, tap } from '@pushrocks/tapbundle';
import * as smartmatch from '../ts/index';
tap.test('first test', async () => {
console.log(smartmatch.standardExport);
const smartMatchInstance = new smartmatch.SmartMatch('*.any');
const isAMatch = smartMatchInstance.match('wow.any');
const isNotAMatch = smartMatchInstance.match('wow.not');
expect(isAMatch).to.be.true;
expect(isNotAMatch).to.be.false;
});
tap.start();

View File

@ -1,3 +1,14 @@
import * as plugins from './smartmatch.plugins';
export let standardExport = 'Hi there! :) This is an exported string';
export class SmartMatch {
private picomatch;
public globString;
constructor(globStringArg: string) {
this.globString = globStringArg;
this.picomatch = plugins.picomatch(this.globString);
}
public match(matchStringArg): boolean {
return this.picomatch(matchStringArg);
}
}

View File

@ -1,2 +1,6 @@
const removeme = {};
export { removeme };
// third party scope
import picomatch from 'picomatch';
export {
picomatch
}