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

atlassian-soy-cli

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

atlassian-soy-cli

Node wrapper for the Atlassian Soy CLI

  • 1.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-40%
Maintainers
1
Weekly downloads
 
Created
Source

Node.js: Atlassian Soy CLI

atlassian-soy-cli is a Node wrapper for Atlassian Soy Templates CLI.

Why?

Compile Soy to Javascript as part of your frontend build using frontend tools, not Maven and Java. Easily integrate with Gulp, Karma, and others.

Installation

npm install --save-dev atlassian-soy-cli

Usage

atlassian-soy-cli exposes a factory function that takes an options object.

var soyCli = require('atlassian-soy-cli')
var cli = soyCli({
  version: '4.1.2', // optional
  basedir: 'src/main/resources',
  outdir: 'target/classes'
});

From then on, call compile(glob) to compile Soy files that match the glob. All methods support both callback and promise style.

// compile all soy templates in basedir (using callback style) 
cli.compile('**/*.soy', callback)

// compile a single soy template (using promise style)
cli.compile('myTemplate.soy').then(...)

Options

The basedir and outdir options are mandatory. Arguments passed in the extraArgs option are passed through to the Soy CLI.

{
  version: "4.1.2", // optional
  basedir: "/path/to/soy/templates",
  outdir: "/path/to/compiled/js",
  extraArgs: {
    'use-ajs-context': true,
    'rootNamespace': 'mynamespace',
    'i18n': [
      '/path/to/file1',
      '/path/to/file2'
    ]
  }
}

The above extraArgs will append the following arguments to the Soy CLI invocation.

--use-ajs-context --rootNamespace "mynamespace" --i18n "/path/to/file1" --i18n "/path/to/file2"

Keywords

FAQs

Package last updated on 06 Oct 2015

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