From cbc89617dc2a663f79a9d4e162bb69cc10e46323 Mon Sep 17 00:00:00 2001 From: or-else Date: Thu, 25 Oct 2018 14:56:51 +0300 Subject: [PATCH] change how version is extracted --- README.md | 7 +++++-- package.json | 2 +- scripts/gen-version.js | 13 +++++++++++++ src/version.js | 3 +++ 4 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 scripts/gen-version.js create mode 100644 src/version.js diff --git a/README.md b/README.md index 15ab5196..923aad40 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ The app is about 200KB minified and gzipped. That includes all dependencies (Rea Although the app is generally usable, keep in mind that this is work in progress. Some bugs probably exist. The app was tested in the latest Chrome & Firefox only. NPM package is available at https://www.npmjs.com/package/tinode-webapp. -Try possibly newer or older version live at https://api.tinode.co/. For login and other instructions [see here](https://github.com/tinode/chat/#demo). +Try possibly newer or older version live at https://api.tinode.co/. For passwords for demo accounts and other instructions [see here](https://github.com/tinode/chat/#demo). Demo avatar photos are from https://www.pexels.com/ under [CC0 license](https://www.pexels.com/photo-license/). @@ -21,11 +21,14 @@ Background pattern from http://subtlepatterns.com/, commercial and non-commercia * For support, general questions, discussions post to [https://groups.google.com/d/forum/tinode](https://groups.google.com/d/forum/tinode). * For bugs and feature requests [open an issue](https://github.com/tinode/webchat/issues/new). +## Translations + +The app is fully internationalized using [Ract-Intl](https://github.com/yahoo/react-intl). You can add a translation for your favorite language by sending a pull request with a json file with translated strings. As an example, take a look at [English]() and [Russian](). + ## Missing functionality * Previews not generated for videos, audio, links or docs. * No end-to-end encryption. -* Editing chat permissions is incomplete. * Emoji support is weak. ## Responsive design diff --git a/package.json b/package.json index caa6ff98..5025dc2d 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "build:css": "postcss css/base.css > css/base.min.css", "wp-build:dev": "webpack --mode development --output-library-target umd --output ./umd/index.dev.js", "wp-build:prod": "webpack --mode production --output-library-target umd --output ./umd/index.prod.js", - "vers": "echo \"export const PACKAGE_VERSION = \\\"`node -p -e \"require('./package.json').version\"`\\\";\" > src/version.js" + "vers": "node scripts/gen-version.js" }, "files": [ "src/index.js", diff --git a/scripts/gen-version.js b/scripts/gen-version.js new file mode 100644 index 00000000..b5fdcf91 --- /dev/null +++ b/scripts/gen-version.js @@ -0,0 +1,13 @@ +var fs = require('fs'); +var version = require('../package.json').version; + +fs.writeFile('./src/version.js', + '// This is a generated file. Don\'t edit.\n\n'+ + 'export const PACKAGE_VERSION = "'+version+'";\n', + { flag: 'w' }, + function(err) { + if (err) { + return console.log(err); + } + } +); diff --git a/src/version.js b/src/version.js new file mode 100644 index 00000000..79390195 --- /dev/null +++ b/src/version.js @@ -0,0 +1,3 @@ +// This is a generated file. Don't edit. + +export const PACKAGE_VERSION = "0.15.8-rc1";