react-intl-po
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -6,2 +6,9 @@ # react-intl-po | ||
## [v1.0.4] | ||
> Apr 12, 2016 | ||
* chore(ava): update lint and test | ||
* chore(codecov): switch to use codecov | ||
* chore(alias): use full name of package | ||
## [v1.0.1] | ||
@@ -8,0 +15,0 @@ > Mar 30, 2016 |
@@ -37,3 +37,3 @@ 'use strict'; | ||
_fs2.default.writeFileSync(output, result); | ||
console.log(_chalk2.default.green('> [rip] write file -> ' + output + ' ✔️\n')); | ||
console.log(_chalk2.default.green('> [react-intl-po] write file -> ' + output + ' ✔️\n')); | ||
} /* eslint-disable no-console */ | ||
@@ -40,0 +40,0 @@ |
@@ -64,3 +64,3 @@ 'use strict'; | ||
_fs2.default.writeFileSync(output, JSON.stringify(result, null, 0)); | ||
console.log(_chalk2.default.green('> [rip] write file -> ' + output + ' ✔️\n')); | ||
console.log(_chalk2.default.green('> [react-intl-po] write file -> ' + output + ' ✔️\n')); | ||
} | ||
@@ -67,0 +67,0 @@ |
{ | ||
"name": "react-intl-po", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Extract POT from react-intl and convert back to json.", | ||
@@ -17,3 +17,4 @@ "author": "Michael Hsu", | ||
"bin": { | ||
"rip": "lib/cli.js" | ||
"rip": "lib/cli.js", | ||
"react-intl-po": "lib/cli.js" | ||
}, | ||
@@ -38,3 +39,3 @@ "files": [ | ||
"test:coverage": "nyc npm run test", | ||
"coverage": "nyc report --reporter=text-lcov | coveralls", | ||
"coverage": "nyc report --reporter=lcov && codecov", | ||
"lint:js": "eslint --ignore-path .gitignore .", | ||
@@ -45,4 +46,4 @@ "lint": "npm run lint:js", | ||
"devDependencies": { | ||
"ava": "^0.13.0", | ||
"babel-cli": "^6.6.5", | ||
"ava": "^0.14.0", | ||
"babel-cli": "^6.7.5", | ||
"babel-plugin-add-module-exports": "^0.1.2", | ||
@@ -53,6 +54,6 @@ "babel-preset-es2015": "^6.6.0", | ||
"babel-register": "^6.7.2", | ||
"coveralls": "^2.11.8", | ||
"eslint": "^2.5.1", | ||
"lint-config-m": "^1.0.5", | ||
"nyc": "^6.1.1" | ||
"codecov": "^1.0.1", | ||
"eslint": "^2.7.0", | ||
"lint-config-m": "^1.1.0", | ||
"nyc": "^6.4.0" | ||
}, | ||
@@ -97,6 +98,6 @@ "babel": { | ||
"glob": "^7.0.3", | ||
"lodash": "^4.6.1", | ||
"lodash": "^4.10.0", | ||
"po2json": "^0.4.1", | ||
"to-object-by": "^1.0.1" | ||
"to-object-by": "^1.0.2" | ||
} | ||
} |
@@ -7,4 +7,6 @@ # react-intl-po | ||
[![Travis][build-badge]][build] [![Coverage Status][coveralls-badge]][coveralls] [![npm package][npm-badge]][npm] [![npm downloads][npm-downloads]][npm] [![license][license-badge]][license] | ||
[![Travis][build-badge]][build] [![Codecov Status][codecov-badge]][codecov] [![npm package][npm-badge]][npm] [![npm downloads][npm-downloads]][npm] [![license][license-badge]][license] | ||
[![Dependency Status][dependency-badge]][dependency] [![devDependency Status][devDependency-badge]][devDependency] [![peerDependency Status][peerDependency-badge]][peerDependency] | ||
[build-badge]: https://img.shields.io/travis/evenchange4/react-intl-po/master.svg?style=flat-square | ||
@@ -16,4 +18,4 @@ [build]: https://travis-ci.org/evenchange4/react-intl-po | ||
[coveralls-badge]: https://img.shields.io/coveralls/evenchange4/react-intl-po/master.svg?style=flat-square | ||
[coveralls]: https://coveralls.io/github/evenchange4/react-intl-po | ||
[codecov-badge]: https://img.shields.io/codecov/c/github/evenchange4/react-intl-po.svg?style=flat-square | ||
[codecov]: https://codecov.io/github/evenchange4/react-intl-po?branch=master | ||
@@ -25,2 +27,10 @@ [npm-downloads]: https://img.shields.io/npm/dt/react-intl-po.svg?style=flat-square | ||
[dependency-badge]: https://david-dm.org/evenchange4/react-intl-po.svg?style=flat-square | ||
[dependency]: https://david-dm.org/evenchange4/react-intl-po | ||
[devDependency-badge]: https://david-dm.org/evenchange4/react-intl-po/dev-status.svg?style=flat-square | ||
[devDependency]: https://david-dm.org/evenchange4/react-intl-po#info=devDependencies | ||
[peerDependency-badge]: https://david-dm.org/evenchange4/react-intl-po/peer-status.svg?style=flat-square | ||
[peerDependency]: https://david-dm.org/evenchange4/react-intl-po#info=peerDependencies | ||
## Installation | ||
@@ -32,3 +42,3 @@ | ||
## Requirements | ||
## Requirements and Workflow | ||
@@ -38,5 +48,8 @@ - react-intl | ||
![RIP Workflow](./docs/workflow.png) | ||
## Usage | ||
There are two sub-commands of `rip`: | ||
There are two sub-commands of `react-intl-po` or `rip`: | ||
@@ -43,0 +56,0 @@ 1. json2pot: Convert `babel-plugin-react-intl`'s output json file to one .pot file. |
@@ -15,5 +15,5 @@ /* eslint-disable no-console */ | ||
fs.writeFileSync(output, result); | ||
console.log(chalk.green(`> [rip] write file -> ${output} ✔️\n`)); | ||
console.log(chalk.green(`> [react-intl-po] write file -> ${output} ✔️\n`)); | ||
} | ||
export default extractAndWritePOTFromMessagesSync; |
@@ -27,5 +27,5 @@ /* eslint-disable no-console */ | ||
fs.writeFileSync(output, JSON.stringify(result, null, 0)); | ||
console.log(chalk.green(`> [rip] write file -> ${output} ✔️\n`)); | ||
console.log(chalk.green(`> [react-intl-po] write file -> ${output} ✔️\n`)); | ||
} | ||
export default filterPOAndWriteTranslateSync; |
@@ -26,9 +26,9 @@ import fs from 'fs'; | ||
'#. [NotFound.errorButton] - Click error Button' + '\n' + | ||
'msgid \"Go to MCS website\"' + '\n' + | ||
'msgstr \"\"' + '\n\n' + | ||
'msgid "Go to MCS website"' + '\n' + | ||
'msgstr ""' + '\n\n' + | ||
'#: ./messages/src/containers/App/App.json' + '\n' + | ||
'#. [App.errorMessage] - The error message when api response as 404 not found' + '\n' + | ||
'msgid \"The device is now private or deleted.\"' + '\n' + | ||
'msgstr \"\"' + '\n', | ||
'msgid "The device is now private or deleted."' + '\n' + | ||
'msgstr ""' + '\n', | ||
); | ||
}); |
@@ -15,3 +15,3 @@ import fs from 'fs'; | ||
filterPOAndWriteTranslateSync('./po/mcs-public.*.po', { messagesPattern, output }); | ||
t.same( | ||
t.deepEqual( | ||
JSON.parse(fs.readFileSync(output, 'utf8')), | ||
@@ -18,0 +18,0 @@ { |
@@ -30,5 +30,5 @@ import test from 'ava'; | ||
'#. [NotFound.errorButton] - Click error Button' + '\n' + | ||
'msgid \"Go to MCS website\"' + '\n' + | ||
'msgstr \"\"' + '\n', | ||
'msgid "Go to MCS website"' + '\n' + | ||
'msgstr ""' + '\n', | ||
); | ||
}); |
@@ -9,3 +9,3 @@ import test from 'ava'; | ||
test('should return messages object with default mapper', t => { | ||
t.same( | ||
t.deepEqual( | ||
readAllMessageAsObjectSync('./messages/**/*.json'), | ||
@@ -54,3 +54,3 @@ { | ||
test('should return messages object with description as key', t => { | ||
t.same( | ||
t.deepEqual( | ||
readAllMessageAsObjectSync( | ||
@@ -57,0 +57,0 @@ './messages/**/App.json', |
@@ -9,3 +9,3 @@ import test from 'ava'; | ||
test('should return po object with default localeMapper', t => { | ||
t.same( | ||
t.deepEqual( | ||
readAllPOAsObjectSync('./po/mcs-public.*.po'), | ||
@@ -20,3 +20,3 @@ { | ||
test('should return po object with custom localeMapper', t => { | ||
t.same( | ||
t.deepEqual( | ||
readAllPOAsObjectSync( | ||
@@ -23,0 +23,0 @@ './po/*_project.po', |
33346
108
Updatedlodash@^4.10.0
Updatedto-object-by@^1.0.2