Skip to content

Commit 6fe1c81

Browse files
committed
Remove rollup
1 parent 13529a5 commit 6fe1c81

30 files changed

+73
-149
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ typings/
6161

6262
# Builds
6363
/dist/
64+
/lib/
6465
/doc/
6566

6667
# Temporary/working files

package.json

+5-8
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,15 @@
1313
"org-mode"
1414
],
1515
"files": [
16-
"dist"
16+
"lib/**/*"
1717
],
18-
"directories": {
19-
"lib": "lib",
20-
"test": "test"
21-
},
18+
"main": "lib/index.js",
19+
"types": "lib/index.d.ts",
2220
"scripts": {
2321
"lint": "eslint lib test --ext .ts --fix",
24-
"test": "env TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' mocha -r ts-node/register 'test/*.ts'",
22+
"test": "mocha -r ts-node/register 'test/*.ts'",
2523
"cover": "nyc -r html -r text npm test",
26-
"build": "rollup -c",
27-
"doc": "esdoc",
24+
"build": "tsc",
2825
"prepublishOnly": "run-s lint test build doc",
2926
"clean": "rimraf .nyc_output coverage dist doc"
3027
},

rollup.config.js

-22
This file was deleted.

lib/alignment.ts src/alignment.ts

File renamed without changes.
File renamed without changes.

lib/focus.ts src/focus.ts

File renamed without changes.

lib/formatter.ts src/formatter.ts

File renamed without changes.

lib/index.ts src/index.ts

File renamed without changes.

lib/options.ts src/options.ts

File renamed without changes.

lib/parser.ts src/parser.ts

File renamed without changes.

lib/point.ts src/point.ts

File renamed without changes.

lib/range.ts src/range.ts

File renamed without changes.
File renamed without changes.
File renamed without changes.

lib/table-row.ts src/table-row.ts

File renamed without changes.

lib/table.ts src/table.ts

File renamed without changes.
File renamed without changes.

test/edit-script.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
Delete,
55
Insert,
66
shortestEditScript,
7-
} from '../lib/edit-script';
7+
} from '../src/edit-script';
88
import { TextEditor } from './text-editor-mock';
99
import { assert, expect } from 'chai';
1010

test/focus.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Focus } from '../lib/focus';
1+
import { Focus } from '../src/focus';
22
import { expect } from 'chai';
33

44
/**

test/formatter.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Alignment, DefaultAlignment, HeaderAlignment } from '../lib/alignment';
1+
import { Alignment, DefaultAlignment, HeaderAlignment } from '../src/alignment';
22
import {
33
_alignText,
44
_computeTextWidth,
@@ -18,12 +18,12 @@ import {
1818
moveColumn,
1919
moveRow,
2020
TextWidthOptions,
21-
} from '../lib/formatter';
22-
import { Options, optionsWithDefaults } from '../lib/options';
23-
import { _readRow, readTable } from '../lib/parser';
24-
import { Table } from '../lib/table';
25-
import { TableCell } from '../lib/table-cell';
26-
import { TableRow } from '../lib/table-row';
21+
} from '../src/formatter';
22+
import { Options, optionsWithDefaults } from '../src/options';
23+
import { _readRow, readTable } from '../src/parser';
24+
import { Table } from '../src/table';
25+
import { TableCell } from '../src/table-cell';
26+
import { TableRow } from '../src/table-row';
2727
import { expect } from 'chai';
2828

2929
const parserOptions: Options = optionsWithDefaults({

test/parser.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
import { optionsWithDefaults } from '../lib/options';
1+
import { optionsWithDefaults } from '../src/options';
22
import {
33
_marginRegex,
44
_readRow,
55
_splitCells,
66
marginRegexSrc,
77
readTable,
8-
} from '../lib/parser';
9-
import { Table } from '../lib/table';
10-
import { TableRow } from '../lib/table-row';
8+
} from '../src/parser';
9+
import { Table } from '../src/table';
10+
import { TableRow } from '../src/table-row';
1111
import { expect } from 'chai';
1212

1313
/**

test/point.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Point } from '../lib/point';
1+
import { Point } from '../src/point';
22
import { expect } from 'chai';
33

44
/**

test/range.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { Point } from '../lib/point';
2-
import { Range } from '../lib/range';
1+
import { Point } from '../src/point';
2+
import { Range } from '../src/range';
33
import { expect } from 'chai';
44

55
/**

test/table-cell.ts

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
/* eslint-disable no-unused-expressions */
2-
// TODO: switch to another testing library
3-
// https://github.com/moll/js-must#beware-of-libraries-that-assert-on-property-access
4-
5-
import { Alignment } from '../lib/alignment';
6-
import { TableCell } from '../lib/table-cell';
1+
import { Alignment } from '../src/alignment';
2+
import { TableCell } from '../src/table-cell';
73
import { expect } from 'chai';
84

95
/**

test/table-editor.ts

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
import { Alignment, DefaultAlignment } from '../lib/alignment';
2-
import { Focus } from '../lib/focus';
3-
import { completeTable, formatTable } from '../lib/formatter';
4-
import { defaultOptions, Options, optionsWithDefaults } from '../lib/options';
5-
import { readTable } from '../lib/parser';
6-
import { Point } from '../lib/point';
7-
import { Range } from '../lib/range';
8-
import { Table } from '../lib/table';
1+
import { Alignment, DefaultAlignment } from '../src/alignment';
2+
import { Focus } from '../src/focus';
3+
import { completeTable, formatTable } from '../src/formatter';
4+
import { defaultOptions, Options, optionsWithDefaults } from '../src/options';
5+
import { readTable } from '../src/parser';
6+
import { Point } from '../src/point';
7+
import { Range } from '../src/range';
8+
import { Table } from '../src/table';
99
import {
1010
_computeNewOffset,
1111
_createIsTableRowRegex,
1212
TableEditor,
13-
} from '../lib/table-editor';
13+
} from '../src/table-editor';
1414
import { TextEditor } from './text-editor-mock';
1515
import { assert, expect } from 'chai';
1616

test/table-row.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { TableCell } from '../lib/table-cell';
2-
import { TableRow } from '../lib/table-row';
1+
import { TableCell } from '../src/table-cell';
2+
import { TableRow } from '../src/table-row';
33
import { expect } from 'chai';
44

55
/**

test/table.ts

+26-26
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import { Focus } from '../lib/focus';
2-
import { Point } from '../lib/point';
3-
import { Range } from '../lib/range';
4-
import { Table } from '../lib/table';
5-
import { TableCell } from '../lib/table-cell';
6-
import { TableRow } from '../lib/table-row';
1+
import { Focus } from '../src/focus';
2+
import { Point } from '../src/point';
3+
import { Range } from '../src/range';
4+
import { Table } from '../src/table';
5+
import { TableCell } from '../src/table-cell';
6+
import { TableRow } from '../src/table-row';
77
import { assert, expect } from 'chai';
88

99
/**
@@ -21,7 +21,7 @@ describe('Table', () => {
2121
new TableRow(
2222
[new TableCell('C'), new TableCell('D'), new TableCell('E')],
2323
' ',
24-
' '
24+
' ',
2525
),
2626
]);
2727
expect(table).to.be.an.instanceOf(Table);
@@ -39,7 +39,7 @@ describe('Table', () => {
3939
new TableRow(
4040
[new TableCell('C'), new TableCell('D'), new TableCell('E')],
4141
' ',
42-
' '
42+
' ',
4343
),
4444
]);
4545
expect(table.getHeight()).to.equal(3);
@@ -57,7 +57,7 @@ describe('Table', () => {
5757
new TableRow(
5858
[new TableCell('C'), new TableCell('D'), new TableCell('E')],
5959
' ',
60-
' '
60+
' ',
6161
),
6262
]);
6363
expect(table.getHeight()).to.equal(3);
@@ -75,7 +75,7 @@ describe('Table', () => {
7575
new TableRow(
7676
[new TableCell('C'), new TableCell('D'), new TableCell('E')],
7777
' ',
78-
' '
78+
' ',
7979
),
8080
]);
8181
expect(table.getWidth()).to.equal(3);
@@ -93,7 +93,7 @@ describe('Table', () => {
9393
new TableRow(
9494
[new TableCell('C'), new TableCell('D'), new TableCell('E')],
9595
' ',
96-
' '
96+
' ',
9797
),
9898
]);
9999
expect(table.getHeaderWidth()).to.equal(2);
@@ -119,7 +119,7 @@ describe('Table', () => {
119119
new TableRow(
120120
[new TableCell('C'), new TableCell('D'), new TableCell('E')],
121121
' ',
122-
' '
122+
' ',
123123
),
124124
];
125125
const table = new Table(originalRows);
@@ -143,7 +143,7 @@ describe('Table', () => {
143143
new TableRow(
144144
[new TableCell('C'), new TableCell('D'), new TableCell('E')],
145145
' ',
146-
' '
146+
' ',
147147
),
148148
];
149149
const table = new Table(rows);
@@ -161,7 +161,7 @@ describe('Table', () => {
161161
new TableRow(
162162
[new TableCell('C'), new TableCell('D'), new TableCell('E')],
163163
' ',
164-
' '
164+
' ',
165165
),
166166
]);
167167
expect(table.getDelimiterRow()).to.be.undefined;
@@ -173,7 +173,7 @@ describe('Table', () => {
173173
new TableRow(
174174
[new TableCell('C'), new TableCell('D'), new TableCell('E')],
175175
' ',
176-
' '
176+
' ',
177177
),
178178
]);
179179
expect(table.getDelimiterRow()).to.be.undefined;
@@ -184,7 +184,7 @@ describe('Table', () => {
184184
new TableRow(
185185
[new TableCell('C'), new TableCell('D'), new TableCell('E')],
186186
' ',
187-
' '
187+
' ',
188188
),
189189
new TableRow([new TableCell('---')], '', ''),
190190
]);
@@ -223,7 +223,7 @@ describe('Table', () => {
223223
new TableRow(
224224
[new TableCell('C'), new TableCell('D'), new TableCell('E')],
225225
' ',
226-
' '
226+
' ',
227227
),
228228
]);
229229
expect(table.getCellAt(-1, 0)).to.be.undefined;
@@ -263,7 +263,7 @@ describe('Table', () => {
263263
new TableRow(
264264
[new TableCell('C'), new TableCell('D'), new TableCell('E')],
265265
' ',
266-
' '
266+
' ',
267267
),
268268
]);
269269
expect(table.getFocusedCell(new Focus(-1, 0, 1))).to.be.undefined;
@@ -289,7 +289,7 @@ describe('Table', () => {
289289
new TableRow(
290290
[new TableCell('C'), new TableCell('D'), new TableCell('E')],
291291
' ',
292-
' '
292+
' ',
293293
),
294294
]);
295295
const lines = ['|A|B|', '|---|', ' |C|D|E| '];
@@ -309,7 +309,7 @@ describe('Table', () => {
309309
new TableRow(
310310
[new TableCell('C'), new TableCell('D'), new TableCell('E')],
311311
' ',
312-
' '
312+
' ',
313313
),
314314
]);
315315
{
@@ -441,7 +441,7 @@ describe('Table', () => {
441441
new TableRow(
442442
[new TableCell('C'), new TableCell('D'), new TableCell('E')],
443443
' ',
444-
' '
444+
' ',
445445
),
446446
]);
447447
expect(table.focusOfPosition(new Point(0, 1), 1)).to.be.undefined;
@@ -460,7 +460,7 @@ describe('Table', () => {
460460
new TableRow(
461461
[new TableCell('C'), new TableCell('D'), new TableCell('E')],
462462
' ',
463-
' '
463+
' ',
464464
),
465465
]);
466466
{
@@ -562,7 +562,7 @@ describe('Table', () => {
562562
new TableRow(
563563
[new TableCell('C'), new TableCell('D'), new TableCell('E')],
564564
' ',
565-
' '
565+
' ',
566566
),
567567
]);
568568
expect(table.positionOfFocus(new Focus(-1, 0, 0), 1)).to.be.undefined;
@@ -581,7 +581,7 @@ describe('Table', () => {
581581
new TableRow(
582582
[new TableCell(' C '), new TableCell('D'), new TableCell('E')],
583583
' ',
584-
' '
584+
' ',
585585
),
586586
]);
587587
{
@@ -637,7 +637,7 @@ describe('Table', () => {
637637
new TableRow(
638638
[new TableCell('C'), new TableCell('D'), new TableCell('E')],
639639
' ',
640-
' '
640+
' ',
641641
),
642642
]);
643643
expect(table.selectionRangeOfFocus(new Focus(-1, 0, 0), 1)).to.be
@@ -657,7 +657,7 @@ describe('Table', () => {
657657
new TableRow(
658658
[new TableCell(' '), new TableCell('D'), new TableCell('E')],
659659
' ',
660-
' '
660+
' ',
661661
),
662662
]);
663663
expect(table.selectionRangeOfFocus(new Focus(0, 0, 0), 1)).to.be

test/text-editor-mock.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { Point } from '../lib/point';
2-
import { Range } from '../lib/range';
3-
import { ITextEditor } from '../lib/text-editor';
1+
import { Point } from '../src/point';
2+
import { Range } from '../src/range';
3+
import { ITextEditor } from '../src/text-editor';
44

55
// This is a mock class of the ITextEditor interface
66
export class TextEditor extends ITextEditor {

test/text-editor.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { Point } from '../lib/point';
2-
import { Range } from '../lib/range';
3-
import { ITextEditor } from '../lib/text-editor';
1+
import { Point } from '../src/point';
2+
import { Range } from '../src/range';
3+
import { ITextEditor } from '../src/text-editor';
44
import { expect } from 'chai';
55

66
/**

0 commit comments

Comments
 (0)