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

package-writer

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

package-writer

Transforms and writes the files for a cartero package. Returns a map of file name to transformed output stream.

  • 0.1.1
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

package-writer

Transforms and writes the files for a cartero package. Returns a map of file name to transformed output stream.

Methods

var packageWriter = require('package-writer');

packageWriter(packageJSON, assets, outputDir, callback)

callback's second parameter is a map of file name to output stream for the transformed file contents.

Parameters: packageJSON - The package info for the package being written. Should contain:

  • path - the directory of the package
  • cartero - any transforms that need to be performed on the assets in the package. Valid properties are styleTransform, imageTransform, and templateTransform.

assets - A map of asset type to files. The valid asset types are style, image, and template. outputDir - The directory where the transformed/copied files should be outputted.

Example:

var packageJSON = {
	path : "/path/to/app/package1",
	cartero : {
		styleTransform : [ "sass-transform" ]
	}
};

var assets = {
	style : [ "/path/to/app/package1/styles.sass" ]
};

var outputDir = "/path/to/app/static/package1Output";

var outputStreams = packageWriter( packageJSON, assets, outputDir, function( err, outputStreams ) {} );

FAQs

Package last updated on 03 Mar 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