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

broccoli-static-compiler

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

broccoli-static-compiler - npm Package Compare versions

Comparing version 0.1.4 to 0.2.0

5

CHANGELOG.md
# master
# 0.2.0
* Use `node-symlink-or-copy` to use symlinks instead of copying when possible (see
[symlink-change.md](https://github.com/broccolijs/broccoli/blob/master/docs/symlink-change.md))
# 0.1.4

@@ -4,0 +9,0 @@

29

index.js

@@ -0,4 +1,6 @@

var fs = require('fs')
var path = require('path')
var mkdirp = require('mkdirp')
var helpers = require('broccoli-kitchen-sink-helpers')
var symlinkOrCopySync = require('symlink-or-copy').sync
var Writer = require('broccoli-writer')

@@ -19,6 +21,7 @@

return readTree(this.inputTree).then(function (srcDir) {
var sourcePath = path.join(srcDir, self.options.srcDir)
var destPath = path.join(destDir, self.options.destDir)
if (self.options.files == null) {
helpers.copyRecursivelySync(
path.join(srcDir, self.options.srcDir),
path.join(destDir, self.options.destDir))
self._copy(sourcePath, destPath)
} else {

@@ -32,6 +35,6 @@ var baseDir = path.join(srcDir, self.options.srcDir)

for (var i = 0; i < files.length; i++) {
mkdirp.sync(path.join(destDir, self.options.destDir, path.dirname(files[i])))
helpers.copyPreserveSync(
path.join(srcDir, self.options.srcDir, files[i]),
path.join(destDir, self.options.destDir, files[i]))
var fileSourcePath = path.join(sourcePath, files[i])
var fileDestPath = path.join(destPath, files[i])
self._copy(fileSourcePath, fileDestPath)
}

@@ -41,1 +44,13 @@ }

}
StaticCompiler.prototype._copy = function (sourcePath, destPath) {
if (destPath[destPath.length -1] === '/') {
destPath = destPath.slice(0, -1)
}
var destDir = path.dirname(destPath)
if (!fs.existsSync(destDir)) {
mkdirp.sync(destDir)
}
symlinkOrCopySync(sourcePath, destPath)
}
{
"name": "broccoli-static-compiler",
"description": "Broccoli compiler to copy static files",
"version": "0.1.4",
"version": "0.2.0",
"author": "Jo Liss <joliss42@gmail.com>",

@@ -17,6 +17,7 @@ "main": "index.js",

"dependencies": {
"mkdirp": "^0.3.5",
"broccoli-kitchen-sink-helpers": "^0.2.5",
"broccoli-writer": "^0.1.1",
"broccoli-kitchen-sink-helpers": "^0.2.0"
"mkdirp": "^0.5.0",
"symlink-or-copy": "^1.0.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