Skip to content

Commit 6512f3b

Browse files
committed
fix(main): export as node.js module not es-module
1 parent 8b8e1c9 commit 6512f3b

File tree

4 files changed

+12
-9
lines changed

4 files changed

+12
-9
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
},
1414
"version": "1.2.1",
1515
"description": "textlint util convert Paragraph Node to text with SourceMap.",
16-
"main": "lib/StringSource.js",
16+
"main": "lib/index.js",
1717
"files": [
1818
"lib",
1919
"src"
@@ -32,9 +32,9 @@
3232
"babel-preset-es2015": "^6.1.18",
3333
"espower-babel": "^4.0.0",
3434
"markdown-to-ast": "^3.1.1",
35-
"mocha": "^2.3.4",
35+
"mocha": "^3.0.2",
3636
"power-assert": "^1.2.0",
37-
"sentence-splitter": "^1.2.0"
37+
"sentence-splitter": "^2.0.0"
3838
},
3939
"dependencies": {
4040
"object-assign": "^4.0.1",

src/index.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// LICENSE : MIT
2+
"use strict";
3+
import StringSource from "./StringSource";
4+
module.exports = StringSource;

test/StringSource-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import assert from "power-assert"
44
import {parse} from "markdown-to-ast";
55
import StringSource from "../src/StringSource";
6-
import sentenceSplitter from "sentence-splitter";
6+
import {split as sentenceSplitter} from "sentence-splitter";
77
describe("StringSource", function () {
88
describe("#toString", function () {
99
it("should concat string", function () {

test/StringSource-txt-test.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
// LICENSE : MIT
22
"use strict";
33
import assert from "power-assert"
4-
import {parse} from "markdown-to-ast";
54
import StringSource from "../src/StringSource";
6-
import sentenceSplitter from "sentence-splitter";
7-
describe("StringSource", function () {
8-
describe("#toString", function () {
9-
it("should concat string", function () {
5+
import {split as sentenceSplitter} from "sentence-splitter";
6+
describe("StringSource", function() {
7+
describe("#toString", function() {
8+
it("should concat string", function() {
109
const AST = {
1110
"type": "Document",
1211
"raw": "Str",

0 commit comments

Comments
 (0)