[MediaWiki-commits] [Gerrit] Ensure tokenizer is linted - change (mediawiki...parsoid)
jenkins-bot has submitted this change and it was merged. Change subject: Ensure tokenizer is linted .. Ensure tokenizer is linted Change-Id: Id5ec75e5d1fe1e655d440ba57efe4943f9c729f7 --- M lib/mediawiki.tokenizer.peg.js M package.json 2 files changed, 6 insertions(+), 2 deletions(-) Approvals: Arlolra: Looks good to me, approved jenkins-bot: Verified diff --git a/lib/mediawiki.tokenizer.peg.js b/lib/mediawiki.tokenizer.peg.js index 4791043..5971bee 100644 --- a/lib/mediawiki.tokenizer.peg.js +++ b/lib/mediawiki.tokenizer.peg.js @@ -299,6 +299,9 @@ return this.tokenize( text, null, args ); }; -if (typeof module === "object") { +if (require.main === module) { + PARSOID_DUMP_TOKENIZER = true; + new PegTokenizer().initTokenizer(); +} else if (typeof module === "object") { module.exports.PegTokenizer = PegTokenizer; } diff --git a/package.json b/package.json index 92cffc7..7264371 100644 --- a/package.json +++ b/package.json @@ -40,9 +40,10 @@ "scripts": { "start": "node api/server.js", "jscs": "jscs api lib tests", + "dump-tokenizer": "node lib/mediawiki.tokenizer.peg.js", "mocha": "mocha --opts tests/mocha/mocha.opts tests/mocha", "parserTests": "node tests/parserTests.js --wt2html --wt2wt --html2wt --html2html --selser --no-color --quiet --blacklist", - "test": "npm run jscs && npm run parserTests && npm run mocha", + "test": "npm run dump-tokenizer && npm run jscs && npm run parserTests && npm run mocha", "cover-mocha": "istanbul cover _mocha --dir ./coverage/mocha -- --opts tests/mocha/mocha.opts tests/mocha", "cover-parserTests": "istanbul cover tests/parserTests.js --dir ./coverage/parserTests -- --wt2html --wt2wt --html2wt --html2html --selser --no-color --quiet --blacklist", "coverage": "npm run cover-mocha && npm run cover-parserTests && istanbul report && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage" -- To view, visit https://gerrit.wikimedia.org/r/202091 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Id5ec75e5d1fe1e655d440ba57efe4943f9c729f7 Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: Cscott Gerrit-Reviewer: Arlolra Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] Ensure tokenizer is linted - change (mediawiki...parsoid)
Cscott has uploaded a new change for review. https://gerrit.wikimedia.org/r/202091 Change subject: Ensure tokenizer is linted .. Ensure tokenizer is linted Change-Id: Id5ec75e5d1fe1e655d440ba57efe4943f9c729f7 --- M lib/mediawiki.tokenizer.peg.js M package.json 2 files changed, 6 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid refs/changes/91/202091/1 diff --git a/lib/mediawiki.tokenizer.peg.js b/lib/mediawiki.tokenizer.peg.js index 4791043..5971bee 100644 --- a/lib/mediawiki.tokenizer.peg.js +++ b/lib/mediawiki.tokenizer.peg.js @@ -299,6 +299,9 @@ return this.tokenize( text, null, args ); }; -if (typeof module === "object") { +if (require.main === module) { + PARSOID_DUMP_TOKENIZER = true; + new PegTokenizer().initTokenizer(); +} else if (typeof module === "object") { module.exports.PegTokenizer = PegTokenizer; } diff --git a/package.json b/package.json index 19329e2..715a7b4 100644 --- a/package.json +++ b/package.json @@ -40,9 +40,10 @@ "scripts": { "start": "node api/server.js", "jscs": "jscs .", + "dump-tokenizer": "node lib/mediawiki.tokenizer.peg.js", "mocha": "mocha --opts tests/mocha/mocha.opts tests/mocha", "parserTests": "node tests/parserTests.js --wt2html --wt2wt --html2wt --html2html --selser --no-color --quiet --blacklist", - "test": "npm run jscs && npm run parserTests && npm run mocha", + "test": "npm run dump-tokenizer && npm run jscs && npm run parserTests && npm run mocha", "cover-mocha": "istanbul cover _mocha --dir ./coverage/mocha -- --opts tests/mocha/mocha.opts tests/mocha", "cover-parserTests": "istanbul cover tests/parserTests.js --dir ./coverage/parserTests -- --wt2html --wt2wt --html2wt --html2html --selser --no-color --quiet --blacklist", "coverage": "npm run cover-mocha && npm run cover-parserTests && istanbul report && cat ./coverage/lcov.info | coveralls && rm -rf ./coverage" -- To view, visit https://gerrit.wikimedia.org/r/202091 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id5ec75e5d1fe1e655d440ba57efe4943f9c729f7 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/parsoid Gerrit-Branch: master Gerrit-Owner: Cscott ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits