@k4a_l/dirtreeist 0.1.4 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +10 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/rollup.config.js +2 -4
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
3
5
|
/**
|
|
4
6
|
* @typedef Options
|
|
5
7
|
* @property {boolean} [includeImageAlt=true]
|
|
@@ -8592,7 +8594,7 @@ function stringifyPosition(value) {
|
|
|
8592
8594
|
* @returns {string}
|
|
8593
8595
|
*/
|
|
8594
8596
|
function point(point) {
|
|
8595
|
-
return index
|
|
8597
|
+
return index(point && point.line) + ':' + index(point && point.column)
|
|
8596
8598
|
}
|
|
8597
8599
|
|
|
8598
8600
|
/**
|
|
@@ -8607,7 +8609,7 @@ function position(pos) {
|
|
|
8607
8609
|
* @param {number|undefined} value
|
|
8608
8610
|
* @returns {number}
|
|
8609
8611
|
*/
|
|
8610
|
-
function index
|
|
8612
|
+
function index(value) {
|
|
8611
8613
|
return value && typeof value === 'number' ? value : 1
|
|
8612
8614
|
}
|
|
8613
8615
|
|
|
@@ -9916,7 +9918,10 @@ const convert = (dirTree, options) => {
|
|
|
9916
9918
|
return reduce(dirTree, buildOption(options, defaultOptions), '', 0, false);
|
|
9917
9919
|
};
|
|
9918
9920
|
|
|
9919
|
-
|
|
9920
|
-
|
|
9921
|
+
const dirtreest = (markdown) => {
|
|
9922
|
+
return parse(markdown).map((dirtree) => convert(dirtree));
|
|
9923
|
+
};
|
|
9921
9924
|
|
|
9922
|
-
|
|
9925
|
+
exports.convert = convert;
|
|
9926
|
+
exports["default"] = dirtreest;
|
|
9927
|
+
exports.parse = parse;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { parse } from './modules/parse';
|
|
2
|
+
import { convert } from './modules/convert';
|
|
1
3
|
import { DirTree } from './types/index';
|
|
2
|
-
declare const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
};
|
|
6
|
-
export default _default;
|
|
4
|
+
declare const dirtreest: (markdown: string) => string[];
|
|
5
|
+
export { parse, convert };
|
|
6
|
+
export default dirtreest;
|
|
7
7
|
export type { DirTree };
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAE3C,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAEvC,QAAA,MAAM,SAAS,aAAc,MAAM,aAElC,CAAA;AAED,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,CAAA;AACzB,eAAe,SAAS,CAAA;AACxB,YAAY,EAAE,OAAO,EAAE,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { parse } from './modules/parse';
|
|
2
2
|
import { convert } from './modules/convert';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
const dirtreest = (markdown) => {
|
|
4
|
+
return parse(markdown).map((dirtree) => convert(dirtree));
|
|
5
|
+
};
|
|
6
|
+
export { parse, convert };
|
|
7
|
+
export default dirtreest;
|
|
5
8
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAI3C,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAI3C,MAAM,SAAS,GAAG,CAAC,QAAgB,EAAE,EAAE;IACrC,OAAO,KAAK,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAA;AAC3D,CAAC,CAAA;AAED,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,CAAA;AACzB,eAAe,SAAS,CAAA"}
|
package/package.json
CHANGED
package/rollup.config.js
CHANGED
|
@@ -7,15 +7,13 @@ export default {
|
|
|
7
7
|
output: {
|
|
8
8
|
file: './dist/index.cjs',
|
|
9
9
|
format: 'cjs',
|
|
10
|
-
exports: 'default',
|
|
10
|
+
// exports: 'default',
|
|
11
11
|
},
|
|
12
12
|
plugins: [
|
|
13
13
|
typescript({
|
|
14
14
|
//module: 'commonjs'
|
|
15
15
|
}),
|
|
16
16
|
nodeResolve(),
|
|
17
|
-
commonjs({
|
|
18
|
-
// extensions: ['.js', '.ts']
|
|
19
|
-
}),
|
|
17
|
+
commonjs({}),
|
|
20
18
|
],
|
|
21
19
|
}
|