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

metalsmith

Package Overview
Dependencies
Maintainers
4
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

metalsmith - npm Package Compare versions

Comparing version 1.4.5 to 1.5.0

4

History.md
1.5.0 - March 29, 2015
----------------------
* add ability to pass in plugins to #run
1.4.5 - March 27, 2015

@@ -3,0 +7,0 @@ ----------------------

16

lib/index.js

@@ -39,3 +39,3 @@

assert(directory, 'You must pass a working directory path.');
this.ware = new Ware();
this.plugins = [];
this.directory(directory);

@@ -50,5 +50,5 @@ this.metadata({});

/**
* Add a `plugin` to the middleware stack.
* Add a `plugin` function to the stack.
*
* @param {Function or Array or Ware} plugin
* @param {Function or Array} plugin
* @return {Metalsmith}

@@ -58,3 +58,3 @@ */

Metalsmith.prototype.use = function(plugin){
this.ware.use(plugin);
this.plugins.push(plugin);
return this;

@@ -177,10 +177,12 @@ };

/**
* Run a set of `files` through the middleware stack.
* Run a set of `files` through the plugins stack.
*
* @param {Object} files
* @param {Array} plugins
* @return {Object}
*/
Metalsmith.prototype.run = unyield(function*(files){
var run = thunkify(this.ware.run.bind(this.ware));
Metalsmith.prototype.run = unyield(function*(files, plugins){
var ware = new Ware(plugins || this.plugins);
var run = thunkify(ware.run.bind(ware));
var res = yield run(files, this);

@@ -187,0 +189,0 @@ return res[0];

{
"name": "metalsmith",
"version": "1.4.5",
"version": "1.5.0",
"license": "MIT",

@@ -5,0 +5,0 @@ "repository": "git://github.com/segmentio/metalsmith.git",

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