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

metalsmith

Package Overview
Dependencies
Maintainers
2
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 0.7.0 to 0.8.0

4

History.md
0.8.0 - May 6, 2014
-------------------
* add `clean` option
0.7.0 - April 29, 2014

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

21

lib/index.js

@@ -11,3 +11,3 @@

var readdir = require('recursive-readdir');
var rm = require('rimraf');
var rm = require('rimraf').sync;
var utf8 = require('is-utf8');

@@ -35,2 +35,3 @@ var Ware = require('ware');

this.destination('build');
this.clean(true);
}

@@ -90,2 +91,13 @@

/**
* Get or set whether the destination directory will be removed before writing.
* @param {Boolean} clean
* @return {Boolean or Metalsmith}
*/
Metalsmith.prototype.clean = function(clean){
if (!arguments.length) return this._clean;
this._clean = clean;
return this;
};
/**
* Join path `strs` with the working directory.

@@ -187,7 +199,6 @@ *

var dest = this.destination();
var clean = this.clean();
rm(dest, function(err){
if (err) return fn(err);
each(Object.keys(files), write, fn);
});
if (clean) rm(dest);
each(Object.keys(files), write, fn);

@@ -194,0 +205,0 @@ function write(file, done){

{
"name": "metalsmith",
"repository": "git://github.com/segmentio/metalsmith.git",
"version": "0.7.0",
"version": "0.8.0",
"license": "MIT",

@@ -6,0 +6,0 @@ "description": "An extremely simple, pluggable static site generator.",

@@ -142,2 +142,6 @@ # Metalsmith

#### #clean(boolean)
Set whether to remove the destination directory before writing to it, or get the current setting. Defaults to `true`.
#### #metadata(json)

@@ -144,0 +148,0 @@

Sorry, the diff of this file is not supported yet

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