Socket
Socket
Sign inDemoInstall

broccoli-i18n-precompile

Package Overview
Dependencies
29
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    broccoli-i18n-precompile

Ember i18n handlebar precompiler for broccoli


Version published
Maintainers
1
Install size
2.41 MB
Created

Readme

Source

#Broccoli i18n template precompiler

Precompiles ember-i18 translation files.

##Installation

npm install --save-dev broccoli-i18n-precompile

##Example

var mergeTrees = require('broccoli-merge-trees');
var compileES6 = require('broccoli-es6-concat');
var i18nPrecompile = require('broccoli-i18n-precompile');
var pickFiles = require('broccoli-static-compiler');


var translationTree = pickFiles('i18nFolder', {
  srcDir: '/',
  files: ['i18n/*.js'],
  destDir: app.name
});

var appTranslations = compileES6(translationTree, {
  outputFile: '/assets/i18n.js',
  inputFiles: ['**/*.js'],
  wrapInEval: false,
});

var precompiledTrans = i18nPrecompile(appTranslations);

It will generate a precompiled js file that you can include in your index.html file

It is important to set wrapInEval to false.

Keywords

FAQs

Last updated on 14 Aug 2014

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc