mirror of
https://github.com/scratchfoundation/scratch-l10n.git
synced 2024-12-22 21:52:35 -05:00
c286f62d69
* bumped minor version * added localeMap for converting between transifex locales and the ones used by Scratch (e.g., pt-br - pt_BR) * using the transifex node package to automatically sync translations * added scripts: * sync_tx_src: uploads an en.json source file, for use by client packages * sync_tx_translations: downloads gui translations, used by this repo, flattens Chrome i18n json into plain key-value json. * sync_tx_blocks: same as above, but blocks need slightly different handling * validate_translations: check the translation json files for basic translation errors * tx_util - methods shared by sync and validate * simplified build-data because jsons have already been flattened * added new npm tasks
31 lines
911 B
JavaScript
31 lines
911 B
JavaScript
const path = require('path');
|
|
|
|
module.exports = {
|
|
mode: process.env.NODE_ENV === 'production' ? 'production' : 'development',
|
|
devtool: 'cheap-module-source-map',
|
|
module: {
|
|
rules: [{
|
|
test: /\.js$/,
|
|
include: path.resolve(__dirname, 'src'),
|
|
use: {
|
|
loader: 'babel-loader',
|
|
options: {
|
|
presets: ['@babel/preset-env'],
|
|
plugins: [
|
|
'@babel/plugin-proposal-object-rest-spread',
|
|
'@babel/plugin-syntax-dynamic-import',
|
|
'@babel/plugin-transform-async-to-generator'
|
|
]
|
|
}
|
|
}
|
|
}]
|
|
},
|
|
entry: {
|
|
l10n: './src/index.js'
|
|
},
|
|
output: {
|
|
path: path.resolve(__dirname, 'dist'),
|
|
filename: '[name].js',
|
|
libraryTarget: 'commonjs2'
|
|
}
|
|
};
|