Skip to content

Commit 9eafd53

Browse files
authored
Merge pull request #22 from textlint-ja/migrate-textlint-scripts
refactor: use textlint-scripts
2 parents 8fdcf63 + 7b036eb commit 9eafd53

File tree

6 files changed

+4295
-15
lines changed

6 files changed

+4295
-15
lines changed

.babelrc

Lines changed: 0 additions & 4 deletions
This file was deleted.

package.json

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,21 @@
2222
"test": "test"
2323
},
2424
"scripts": {
25-
"build": "NODE_ENV=production babel src --out-dir lib --source-maps",
26-
"watch": "babel src --out-dir lib --watch --source-maps",
25+
"build": "textlint-scripts build",
26+
"watch": "textlint-scripts build --watch",
2727
"prepublish": "npm run --if-present build",
28-
"test": "mocha"
28+
"test": "textlint-scripts test"
2929
},
3030
"keywords": [
3131
"rule",
3232
"textlint",
3333
"textlintrule"
3434
],
3535
"devDependencies": {
36-
"babel-cli": "^6.1.18",
37-
"babel-plugin-add-module-exports": "^0.2.1",
38-
"babel-preset-es2015": "^6.1.18",
3936
"espower-babel": "^4.0.0",
40-
"mocha": "^2.3.4",
4137
"power-assert": "^1.1.0",
4238
"textlint": "^6.0.3",
43-
"textlint-tester": "^1.2.0"
39+
"textlint-scripts": "^2.1.0"
4440
},
4541
"dependencies": {
4642
"kuromojin": "^1.2.1",

src/no-doubled-joshi.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ const defaultOptions = {
6464
6565
TODO: need abstraction
6666
*/
67-
export default function(context, options = {}) {
67+
module.exports = function(context, options = {}) {
6868
const helper = new RuleHelper(context);
6969
// 最低間隔値
7070
const minInterval = options.min_interval || defaultOptions.min_interval;

test/mocha.opts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
--compilers js:espower-babel/guess
1+
--require textlint-scripts/register

test/no-doubled-joshi-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import rule from "../src/no-doubled-joshi";
21
import TextLintTester from "textlint-tester";
2+
const rule = require("../src/no-doubled-joshi");
33
const tester = new TextLintTester();
44
/*
55
`**`のような装飾は取り除かれてから評価されているので、

0 commit comments

Comments
 (0)