Skip to content

Commit 7a72b6a

Browse files
committed
iconfig and docs build script
1 parent 9d04413 commit 7a72b6a

4 files changed

Lines changed: 33 additions & 3 deletions

File tree

scripts/build-docs.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
set -x
4+
5+
rm -rf docs
6+
npm run generate-docs
7+
mv docs/@dataparty/api/1.2.17/* docs/
8+
cp -r images/ docs

src/config/iconfig.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
/**
3+
* @interface
4+
*/
5+
class IConfig {
6+
async start(){ throw 'not implemented' }
7+
async clear(){ throw 'not implemented' }
8+
readAll(){ throw 'not implemented' }
9+
read(key){ throw 'not implemented' }
10+
async write(key, data){ throw 'not implemented' }
11+
exists(key){ throw 'not implemented' }
12+
async save(){ throw 'not implemented' }
13+
}
14+
15+
module.exports = IConfig

src/config/index.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,15 @@ const MemoryConfig = require('./memory')
33
const JsonFileConfig = require('./json-file')
44
const LocalStorageConfig = require('./local-storage')
55

6-
module.exports = {
6+
/**
7+
* Config
8+
* @namespace Config
9+
*/
10+
const Config = {
711
NconfConfig,
812
MemoryConfig,
913
JsonFileConfig,
1014
LocalStorageConfig
11-
}
15+
}
16+
17+
module.exports = Config

src/config/json-file.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ const logger = require('debug')('dataparty.config.json-file')
1010
const IConfig = require('./iconfig')
1111

1212
/**
13-
* @class
13+
* @class Config.JsonFileConfig
1414
* @implements {IConfig}
15+
* @namespace Config
1516
*/
1617
class JsonFileConfig extends IConfig {
1718

0 commit comments

Comments
 (0)