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

component-builder

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

component-builder - npm Package Compare versions

Comparing version 0.6.2 to 0.6.3

5

History.md
0.6.3 / 2013-02-15
==================
* add configuration to copy files instead of symlink
0.6.2 / 2013-01-04

@@ -3,0 +8,0 @@ ==================

35

lib/builder.js

@@ -7,2 +7,3 @@

var fs = require('fs')
, cp = require('fs-extra').copy
, path = require('path')

@@ -40,2 +41,3 @@ , join = path.join

this._js = '';
this.copy = false;
this.dir = dir;

@@ -97,2 +99,3 @@ this.root = ! parent;

Builder.prototype.inherit = function(dep){
dep.copy = this.copy;
dep._cache = this._cache;

@@ -119,2 +122,13 @@ dep._hooks = this._hooks;

/**
* Enable "copyFiles" in the build.
*
* @api public
*/
Builder.prototype.copyFiles = function(){
debug('copy files enabled');
this.copy = true;
};
/**
* Enable "sourceURLs" in the build.

@@ -680,11 +694,20 @@ *

Builder.prototype.copyTo = function(file, dest, fn){
var dir = dirname(dest);
var dir = dirname(dest)
, self = this
function done(err) {
if (err && 'EEXIST' == err.code) return fn(null, dest);
fn(err, dest);
}
debug('mkdir -p %s', dir);
mkdir(dir, function(err){
if (err) return fn(err);
debug('link %s -> %s', file, dest);
fs.symlink(file, dest, function(err){
if (err && 'EEXIST' == err.code) return fn(null, dest);
fn(err, dest);
});
if (self.copy){
debug('cp %s -> %s', file, dest);
cp(file, dest, done);
} else {
debug('link %s -> %s', file, dest);
fs.symlink(file, dest, done);
}
});

@@ -691,0 +714,0 @@ };

5

package.json
{
"name": "component-builder",
"version": "0.6.2",
"version": "0.6.3",
"description": "Component build tool",

@@ -15,3 +15,4 @@ "keywords": [

"debug": "*",
"better-assert": "~0.1.0"
"better-assert": "~0.1.0",
"fs-extra": "~0.5.0"
},

@@ -18,0 +19,0 @@ "devDependencies": {

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