New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

parcelify

Package Overview
Dependencies
Maintainers
3
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parcelify - npm Package Compare versions

Comparing version 0.6.2 to 0.6.3

1

lib/package.js

@@ -30,2 +30,3 @@ var path = require('path');

this.dependentParcels = [];
this.assetsByType = {};

@@ -32,0 +33,0 @@ EventEmitter.call( this );

4

package.json
{
"name": "parcelify",
"version": "0.6.2",
"version": "0.6.3",
"description": "Create css bundles from npm packages using the browserify dependency graph.",

@@ -12,3 +12,3 @@ "main": "index.js",

"through2": "~0.4.1",
"parcel-map": "~1.0.1",
"parcel-map": "~1.1.0",
"shasum": "~1.0.0",

@@ -15,0 +15,0 @@ "browserify": "~3.30.2",

# Parcelify
Create css bundles from npm packages using the [browserify](http://browserify.org/) dependency graph.
Output css or other bundles based on the [browserify](http://browserify.org/) dependency graph.
* Use npm packages for reusable interface components.
* Easily include transforms for scss, less, etc. on a per-package basis.
* Rebuild css bundle automatically with watch mode.
* Rebuild bundles automatically with watch mode.
Many thanks to [James Halliday](https://twitter.com/substack) for his help and guidance in bringing this module into reality.
Many thanks to [James Halliday](https://twitter.com/substack) for his help and guidance in bringing this project into reality.

@@ -59,7 +59,9 @@ [![build status](https://secure.travis-ci.org/rotundasoftware/parcelify.png)](http://travis-ci.org/rotundasoftware/parcelify)

```
--cssBundle, -c Path of the css bundle.
--cssBundle, -c Path of a destination css bundle.
--tmplBundle, -t Path of optional template bundle (see below discussion on client side templates).
--watch, -w Watch mode - automatically rebuild bundles as appropriate for changes.
--jsBundle, -j Path of the optional JavaScript bundle (i.e. browserify's output).
--jsBundle, -j Path of the JavaScript bundle (i.e. browserify's output).

@@ -101,4 +103,5 @@ --debug, -d Enable source maps that allow you to debug your js files separately.

bundles : {
style : 'bundle.css', // path of css bundle
script : 'bundle.js', // path of javascript bundle (not output if omitted)
script : 'bundle.js', // path of javascript bundle (not output if omitted)
style : 'bundle.css', // path of css bundle (not output if omitted)
template : 'bundle.tmpl', // path of template bundle (not output if omitted)
},

@@ -116,17 +119,21 @@

### p.on( 'done', function(){} );
Called when the css bundle has been output.
Called when all bundles have been output.
### p.on( 'error', function( err ){} );
Called when a error occurs.
Called when an error occurs.
### p.on( 'packageCreated', function( package, isMain ){} );
Called when a new package is created. `package` is a package object as defined in lib/package.js. `isMain` is true iff the package corresponds to the entry point `mainPath`.
Called when a new package is created. `package` is a package object as defined in `lib/package.js`. `isMain` is true iff the package corresponds to the entry point `mainPath`.
### p.on( 'assetUpdated', function( eventType, asset ){} );
Called when a style asset is updated in watch mode. `eventType` is `'added'`, `'changed'`, or `'deleted'`, and `asset` is an asset object as defined in lib/asset.js.
Called when a style asset is updated in watch mode. `eventType` is `'added'`, `'changed'`, or `'deleted'`, and `asset` is an asset object as defined in `lib/asset.js`.
## What about client side templates?
Parcelify can compile template bundles in the exact same was as css bundles using the `-t` option on the command line and the `template` key in package.json. However, for maximum encapsulation and inter-package compatibility we recommend using a browserify transform like [node-hbsfy](https://github.com/epeli/node-hbsfy) to precompile templates and `require` them explicitly.
Parcelify can compile template bundles using the `-t` option on the command line and the `template` key in package.json. However, if you plan to share your packages we recommend against this practice as it makes your packages difficult to consume. Instead we recommend using a browserify transform like [node-hbsfy](https://github.com/epeli/node-hbsfy) or [nunjucksify](https://github.com/rotundasoftware/nunjucksify) to precompile templates and `require` them explicitly.
## Advanced usage and other assets like images
Parcelify actually supports concatenation of arbitrary asset types. Just add a bundle for that asset type in the `bundles` key in parcelify options and use the same key to enumerate assets of that type in your `package.json`. For the case of assets like images, that do not need to be concatenated, you can specify a `null` path for the bundle. Parcelify will collect all assets of that type but not concatenate them. You can then process the individual assets further using the event callbacks.
## Contributors

@@ -133,0 +140,0 @@

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