Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
#!/usr/bin/env node
'use strict';
const translocoUtils = require('@ngneat/transloco-utils');
const { run } = require('./index');
const commandLineArgs = require('command-line-args');
const optionDefinitions = [{ name: 'watch', alias: 'w', type: Boolean, defaultValue: false }];
const cliParams = commandLineArgs(optionDefinitions);
const config = translocoUtils.getConfig();
run({
watch: cliParams.watch,
rootTranslationsPath: config.rootTranslationsPath,
scopedLibs: config.scopedLibs
});
export function getConfig(): TranslocoConfig {
if (config) return config;
config = getTranslocoConfig();
return config;
}
const path = require('path');
const utils = require('./utils');
const chalk = require('chalk');
const glob = require('glob');
const chokidar = require('chokidar');
const translocoUtils = require('@ngneat/transloco-utils');
const config = translocoUtils.getConfig();
let scopeFilesMap = [];
const example = `
e.g:
module.exports = {
scopedLibs: [{
src: './projects/core',
dist: ['./projects/spa/src/assets/i18n', './src/assets/i18n/']
}]
};
`;
const i18nExample = `
e.g:
{
"i18n": [