Skip to content

Instantly share code, notes, and snippets.

var webpack = require('webpack')
var PROD = (process.env.NODE_ENV === 'production')
module.exports = {
entry: ["./src/phrase.ts", "./src/directives/phrase_javascript.ts"],
output: {
filename: PROD ? "angular-phrase.min.js" : "angular-phrase.js",
path: __dirname + "/dist"
},
devtool: 'source-map',
puts %{This script checks the main locale of a PhraseApp project for translations with copy changes and then adds the tag retranslate_<locale_code> to keys which translation has not changed since the copy change of its source.
It only includes verified main locale translations.
If it finds a newer change in the target language it removes the tag retranslate_<locale_code> again.
e.g. change in main locale en-GB, key is tagged retranslate_de, translator adapts (or verifies/unverifies) German translation, key tag retranslate_de is removed.
It takes the parameters via ENV:
PHRASEAPP_ACCESS_TOKEN=abc123