Compare commits

...

4 Commits

Author SHA1 Message Date
Kim Biesbjerg
5d5b07ba2c bump version 2019-08-03 11:30:50 +02:00
Kim Biesbjerg
7eefd6c8d3 fix donation message colors 2019-08-03 11:30:30 +02:00
Kim Biesbjerg
50fd3ae9e2 (chore) bump version 2019-08-02 13:34:45 +02:00
Kim Biesbjerg
a5b8f6e6c6 (bugfix) order of keys was not preserved when using namespaced-json format. Closes #131 2019-08-02 13:34:18 +02:00
4 changed files with 20 additions and 14 deletions

7
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{
"name": "@biesbjerg/ngx-translate-extract",
"version": "2.3.4",
"version": "3.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -512,9 +512,8 @@
}
},
"flat": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz",
"integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==",
"version": "git://github.com/lenchvolodymyr/flat.git#ffe77efe8c33bc80ffb2f7a465537610dea4f611",
"from": "git://github.com/lenchvolodymyr/flat.git#ffe77ef",
"requires": {
"is-buffer": "~2.0.3"
}

View File

@@ -1,6 +1,6 @@
{
"name": "@biesbjerg/ngx-translate-extract",
"version": "3.0.0",
"version": "3.0.2",
"description": "Extract strings from projects using ngx-translate",
"main": "dist/index.js",
"typings": "dist/index.d.ts",
@@ -60,7 +60,7 @@
"@angular/compiler": "^8.1.3",
"boxen": "^4.1.0",
"colorette": "^1.1.0",
"flat": "^4.1.0",
"flat": "git://github.com/lenchvolodymyr/flat.git#ffe77ef",
"gettext-parser": "^4.0.1",
"glob": "^7.1.4",
"mkdirp": "^0.5.1",

View File

@@ -3,17 +3,15 @@ import * as boxen from 'boxen';
import * as terminalLink from 'terminal-link';
const url = 'https://donate.biesbjerg.com';
const text = `
If this tool saves you time, please consider making a
donation towards the continued maintainence and development:
const link = terminalLink(url, url);
const message = `
If this tool saves you or your company time, please consider making a
donation to support my work and the continued maintainence and development:
${yellow(terminalLink(url, url))}
`;
${yellow(link)}`;
export const donateMessage = boxen(text.trim(), {
export const donateMessage = boxen(message.trim(), {
padding: 1,
margin: 0,
borderColor: 'yellow',
backgroundColor: 'black',
dimBorder: true
});

View File

@@ -57,4 +57,13 @@ describe('NamespacedJsonCompiler', () => {
expect(result).to.equal('{\n "NAMESPACE": {\n "KEY": {\n "FIRST_KEY": "",\n "SECOND_KEY": "VALUE"\n }\n }\n}');
});
it('should not reorder keys when compiled', () => {
const collection = new TranslationCollection({
'BROWSE': '',
'LOGIN': ''
});
const result: string = compiler.compile(collection);
expect(result).to.equal('{\n\t"BROWSE": "",\n\t"LOGIN": ""\n}');
});
});