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

broccoli

Package Overview
Dependencies
Maintainers
1
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

broccoli - npm Package Compare versions

Comparing version 0.12.3 to 0.13.0

.asd~

6

CHANGELOG.md
# master
# 0.13.0
* Dereference symlinks in `broccoli build` output by copying the files or
directories they point to into place
* Sort entries when browsing directories in middleware
# 0.12.3

@@ -4,0 +10,0 @@

25

lib/builder.js

@@ -137,5 +137,3 @@ var path = require('path')

var brocfile = findup('Brocfile.js', {nocase: true})
if (brocfile == null) {
throw new Error('Brocfile.js not found (note: was previously Broccolifile.js)')
}
if (brocfile == null) throw new Error('Brocfile.js not found')

@@ -150,24 +148,3 @@ var baseDir = path.dirname(brocfile)

if (typeof tree === 'function') {
throw new Error('Exporting a function in Brocfile.js is no longer supported. ' +
'Export a tree instead. To update, turn this\n' +
'\n' +
' module.exports = function (broccoli) {\n' +
' ...\n' +
' return someTree;\n' +
' };\n' +
'\n' +
'into this\n' +
'\n' +
' ...\n' +
' module.exports = someTree;\n')
}
if (Array.isArray(tree)) {
throw new Error('Returning an array from Brocfile.js is no longer supported\n' +
'Run "npm install --save-dev broccoli-merge-trees" and use it like so in Brocfile.js:\n' +
'var mergeTrees = require(\'broccoli-merge-trees\');\n' +
'return mergeTrees([tree1, tree2, tree3], { overwrite: true });')
}
return tree
}
var fs = require('fs')
var program = require('commander')
var RSVP = require('rsvp')
var ncp = require('ncp')
ncp.limit = 1
var copyDereferenceSync = require('copy-dereference').sync

@@ -33,14 +31,9 @@ var broccoli = require('./index')

.then(function (hash) {
var dir = hash.directory
try {
fs.mkdirSync(outputDir)
copyDereferenceSync(dir, outputDir)
} catch (err) {
if (err.code !== 'EEXIST') throw err
console.error('Error: Directory "' + outputDir + '" already exists. Refusing to overwrite files.')
process.exit(1)
if (err.code === 'EEXIST') err.message += ' (we cannot build into an existing directory)'
throw err
}
var dir = hash.directory
return RSVP.denodeify(ncp)(dir, outputDir, {
clobber: false,
stopOnErr: true
})
})

@@ -47,0 +40,0 @@ .finally(function () {

@@ -53,3 +53,3 @@ var path = require('path')

url: request.url,
files: fs.readdirSync(filename).map(function (child){
files: fs.readdirSync(filename).sort().map(function (child){
var stat = fs.statSync(path.join(filename,child)),

@@ -56,0 +56,0 @@ isDir = stat.isDirectory()

@@ -46,3 +46,3 @@ var Watcher = require('./watcher')

watcher.on('change', function(results) {
console.log('Built - ' + Math.round(results.totalTime / 1e6) + ' ms')
console.log('Built - ' + Math.round(results.totalTime / 1e6) + ' ms @ ' + new Date().toString())
liveReload()

@@ -49,0 +49,0 @@ })

{
"name": "broccoli",
"description": "Fast client-side asset builder",
"version": "0.12.3",
"version": "0.13.0",
"author": "Jo Liss <joliss42@gmail.com>",

@@ -19,3 +19,3 @@ "main": "lib/index.js",

"mime": "^1.2.11",
"ncp": "^0.5.0",
"copy-dereference": "^1.0.0",
"rsvp": "^3.0.6",

@@ -22,0 +22,0 @@ "tiny-lr": "0.0.5"

@@ -17,2 +17,5 @@ # Broccoli

Windows support appears to still be spotty. Reports (on GitHub or IRC) about
specific failures are much appreciated -- we love collecting stack traces!
## Installation

@@ -62,2 +65,3 @@

* [broccoli-coffee](https://github.com/joliss/broccoli-coffee)
* [broccoli-concat](https://github.com/rlivsey/broccoli-concat)
* [broccoli-csso](https://github.com/sindresorhus/broccoli-csso)

@@ -64,0 +68,0 @@ * [broccoli-defeatureify](https://github.com/sindresorhus/broccoli-defeatureify)

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