Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

broccoli-i18n-precompile

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

broccoli-i18n-precompile

Ember i18n handlebar precompiler for broccoli

  • 0.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
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

Package last updated on 14 Aug 2014

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc