Skip to content

Commit

Permalink
fix: restyle + adjust parseWithPointers
Browse files Browse the repository at this point in the history
  • Loading branch information
P0lip authored and Marc MacLeod committed Dec 5, 2018
1 parent 8156037 commit a0c9986
Show file tree
Hide file tree
Showing 22 changed files with 79 additions and 638 deletions.
9 changes: 3 additions & 6 deletions src/__tests__/__snapshots__/parseWithPointers.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -85,39 +85,36 @@ Object {
"offset": 0,
},
},
"/children/0/": Position {
"/children/0": Object {
"end": Object {
"column": 11,
"line": 1,
"offset": 10,
},
"indent": Array [],
"start": Object {
"column": 1,
"line": 1,
"offset": 0,
},
},
"/children/0/children/0/": Position {
"/children/0/children/0": Object {
"end": Object {
"column": 11,
"line": 1,
"offset": 10,
},
"indent": Array [],
"start": Object {
"column": 1,
"line": 1,
"offset": 0,
},
},
"/children/0/children/0/children/0/": Position {
"/children/0/children/0/children/0": Object {
"end": Object {
"column": 9,
"line": 1,
"offset": 8,
},
"indent": Array [],
"start": Object {
"column": 3,
"line": 1,
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/parse.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ import { parse } from '../parse';
describe('parse', () => {
it('should parse simple', () => {
expect(parse('**simple**')).toMatchSnapshot();
})
});
});
4 changes: 3 additions & 1 deletion src/__tests__/stringify.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { stringify } from '../stringify';

describe('stringify', () => {
it('should work', () => {
expect(stringify(JSON.parse(fs.readFileSync(path.resolve(__dirname, './fixtures/simple.json'), 'utf-8')))).toMatchSnapshot();
expect(
stringify(JSON.parse(fs.readFileSync(path.resolve(__dirname, './fixtures/simple.json'), 'utf-8')))
).toMatchSnapshot();
});
});
1 change: 0 additions & 1 deletion src/ast-types/mdast/index.ts

This file was deleted.

144 changes: 0 additions & 144 deletions src/ast-types/mdast/types.ts

This file was deleted.

9 changes: 0 additions & 9 deletions src/ast-types/smdast/annotations.ts

This file was deleted.

7 changes: 0 additions & 7 deletions src/ast-types/smdast/blockquote.ts

This file was deleted.

10 changes: 0 additions & 10 deletions src/ast-types/smdast/element.ts

This file was deleted.

5 changes: 0 additions & 5 deletions src/ast-types/smdast/index.ts

This file was deleted.

13 changes: 0 additions & 13 deletions src/ast-types/smdast/tab.ts

This file was deleted.

22 changes: 0 additions & 22 deletions src/ast-types/smdast/types.ts

This file was deleted.

5 changes: 1 addition & 4 deletions src/ast-types/unist/index.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
const visit: any = require('unist-util-visit');

import * as types from './types';

export { visit, types };
export { types };
export * from './data';
export * from './node';
export * from './parent';
export * from './point';
export * from './position';
export * from './text';
export * from './visit-parents';
export * from './types';
91 changes: 0 additions & 91 deletions src/ast-types/unist/visit-parents.ts

This file was deleted.

4 changes: 1 addition & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
export * from './stringify';
export * from './parse';

// parser is a heavier dep, so it is not included in default exports. must import directly
// export * from './parseWithPointers';
export * from './parseWithPointers';
Loading

0 comments on commit a0c9986

Please sign in to comment.