fix(core): update
This commit is contained in:
parent
385285d897
commit
7d240b3461
5
package-lock.json
generated
5
package-lock.json
generated
@ -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",
|
||||
|
@ -20,7 +20,9 @@
|
||||
"tslint": "^5.11.0",
|
||||
"tslint-config-prettier": "^1.15.0"
|
||||
},
|
||||
"dependencies": {},
|
||||
"dependencies": {
|
||||
"picomatch": "^2.2.1"
|
||||
},
|
||||
"files": [
|
||||
"ts/**/*",
|
||||
"ts_web/**/*",
|
||||
|
@ -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();
|
||||
|
13
ts/index.ts
13
ts/index.ts
@ -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);
|
||||
}
|
||||
}
|
@ -1,2 +1,6 @@
|
||||
const removeme = {};
|
||||
export { removeme };
|
||||
// third party scope
|
||||
import picomatch from 'picomatch';
|
||||
|
||||
export {
|
||||
picomatch
|
||||
}
|
Loading…
Reference in New Issue
Block a user