update to new gitzone standard

This commit is contained in:
Philipp Kunz 2017-04-09 16:51:33 +02:00
parent 44dd315c6f
commit 1365676a12
8 changed files with 1167 additions and 148 deletions

View File

@ -47,5 +47,6 @@ mySmartChok.stop()
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)
[![repo-footer](https://pushrocks.gitlab.io/assets/repo-footer.svg)](https://push.rocks)

1
dist/index.d.ts vendored
View File

@ -1,4 +1,3 @@
/// <reference types="chokidar" />
/// <reference types="q" />
import * as plugins from './smartchok.plugins';
import { Stringmap } from 'lik';

3
dist/index.js vendored
View File

@ -1,4 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const plugins = require("./smartchok.plugins");
const lik_1 = require("lik");
/**
@ -79,4 +80,4 @@ class Smartchok {
}
}
exports.Smartchok = Smartchok;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsK0NBQThDO0FBQzlDLDZCQUErQjtBQUsvQjs7R0FFRztBQUNIO0lBUUU7O09BRUc7SUFDSCxZQUFZLGFBQXVCLEVBQUUsYUFBNEMsRUFBRTtRQVZuRixtQkFBYyxHQUFHLElBQUksZUFBUyxFQUFFLENBQUE7UUFFaEMsV0FBTSxHQUFxQixNQUFNLENBQUE7UUFFekIscUJBQWdCLEdBQUcsT0FBTyxDQUFDLENBQUMsQ0FBQyxLQUFLLEVBQVEsQ0FBQSxDQUFDLGlEQUFpRDtRQUM1Rix1QkFBa0IsR0FBRyxJQUFJLE9BQU8sQ0FBQyxHQUFHLENBQUMsYUFBYSxFQUFFLENBQUEsQ0FBQyxvQ0FBb0M7UUFNL0YsSUFBSSxDQUFDLGNBQWMsQ0FBQyxj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LE9BQU8sQ0FBQyxJQUFJLENBQUMsUUFBUSxZQUFZLEVBQUUsQ0FBQSxDQUFDLENBQUMsQ0FBQyxDQUFBO1FBQzlELENBQUM7SUFDSCxDQUFDO0NBQ0Y7QUFqRkQsOEJBaUZDIn0=

View File

@ -1,8 +1,9 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
require("typings-global");
exports.chokidar = require("chokidar");
exports.lik = require("lik");
exports.path = require("path");
exports.q = require("q");
exports.rx = require("rxjs/Rx");
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRjaG9rLnBsdWdpbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9zbWFydGNob2sucGx1Z2lucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsMEJBQXVCO0FBQ3ZCLHVDQUE0QztBQUM1Qyw2QkFBa0M7QUFDbEMsK0JBQW9DO0FBQ3BDLHlCQUE4QjtBQUM5QixnQ0FBcUMifQ==
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRjaG9rLnBsdWdpbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9zbWFydGNob2sucGx1Z2lucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLDBCQUF1QjtBQUN2Qix1Q0FBNEM7QUFDNUMsNkJBQWtDO0FBQ2xDLCtCQUFvQztBQUNwQyx5QkFBOEI7QUFDOUIsZ0NBQXFDIn0=

View File

@ -19,18 +19,17 @@
},
"homepage": "https://gitlab.com/pushrocks/smartchok#README",
"dependencies": {
"@types/chokidar": "^1.4.31",
"@types/chokidar": "^1.6.0",
"@types/q": "x.x.x",
"chokidar": "^1.6.1",
"lik": "^1.0.27",
"q": "^1.4.1",
"rxjs": "^5.1.1",
"lik": "^1.0.30",
"q": "^1.5.0",
"rxjs": "^5.3.0",
"smartipc": "^1.0.9",
"typings-global": "^1.0.14"
},
"devDependencies": {
"@types/should": "^8.1.30",
"should": "^11.2.0",
"smartfile": "^4.1.5",
"typings-test": "^1.0.3"
"smartfile": "^4.1.9",
"tapbundle": "^1.0.5"
}
}

1
test/test.d.ts vendored
View File

@ -1 +0,0 @@
import 'typings-test';

View File

@ -1,38 +1,43 @@
import 'typings-test'
import * as should from 'should'
import { tap, expect } from 'tapbundle'
import * as smartfile from 'smartfile'
import * as smartq from 'smartq'
import * as rx from 'rxjs/Rx'
// the module to test
import * as smartchok from '../dist/index'
describe('smartchok',function(){
let testSmartchok: smartchok.Smartchok
let testAddObservable: rx.Observable<any>
let testSubscription: rx.Subscription
it('should create a new instance',function(){
testSmartchok = new smartchok.Smartchok([])
should(testSmartchok).be.instanceof(smartchok.Smartchok)
})
it('should add some files to watch and start',function(done){
testSmartchok.add(['./test/assets/**/*.txt'])
testSmartchok.start().then(() => {
testSmartchok.add(['./test/assets/**/*.md'])
done()
}).catch(err => { console.log(err) })
})
it('should get an observable for a certain event',function(done){
testSmartchok.getObservableFor('add').then((observableArg) => {
testAddObservable = observableArg
done()
}).catch(err => { console.log(err) })
})
it('should register an add operation',function(done){
this.timeout(5000)
testSubscription = testAddObservable.subscribe(x => {
done()
})
smartfile.memory.toFs('HI','./test/assets/hi.txt')
})
it('should stop the watch process',function() {
testSmartchok.stop()
})
})
let testSmartchok: smartchok.Smartchok
let testAddObservable: rx.Observable<any>
let testSubscription: rx.Subscription
tap.test('should create a new instance', async () => {
testSmartchok = new smartchok.Smartchok([])
return expect(testSmartchok).to.be.instanceof(smartchok.Smartchok)
}).catch(tap.threw)
tap.test('should add some files to watch and start', async () => {
testSmartchok.add([ './test/assets/**/*.txt' ])
let localPromise = testSmartchok.start().then(async () => {
testSmartchok.add([ './test/assets/**/*.md' ])
})
return await expect(localPromise).to.eventually.be.fulfilled
}).catch(tap.threw)
tap.test('should get an observable for a certain event', async () => {
let localPromise = testSmartchok.getObservableFor('add').then(async (observableArg) => {
testAddObservable = observableArg
})
return await expect(localPromise).to.eventually.be.fulfilled
}).catch(tap.threw)
tap.test('should register an add operation', async () => {
let testDeferred = smartq.defer()
testSubscription = testAddObservable.subscribe(x => {
testDeferred.resolve()
})
smartfile.memory.toFs('HI', './test/assets/hi.txt')
return await expect(testDeferred.promise).to.eventually.be.fulfilled
}).catch(tap.threw)
tap.test('should stop the watch process', async () => {
testSmartchok.stop()
}).catch(tap.threw)

1218
yarn.lock

File diff suppressed because it is too large Load Diff