How to use the @ngneat/transloco-utils.getConfig function in @ngneat/transloco-utils

To help you get started, we’ve selected a few @ngneat/transloco-utils examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ngneat / transloco / projects / ngneat / transloco-scoped-libs / cli.js View on Github external
#!/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
});
github ngneat / transloco / schematics / src / utils / transloco.ts View on Github external
export function getConfig(): TranslocoConfig {
  if (config) return config;
  config = getTranslocoConfig();
  return config;
}
github ngneat / transloco / projects / ngneat / transloco-scoped-libs / index.js View on Github external
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": [

@ngneat/transloco-utils

Transloco utils library

MIT
Latest version published 12 months ago

Package Health Score

64 / 100
Full package analysis

Popular @ngneat/transloco-utils functions