compare-directory

1.1.0 • Public • Published

compare-directory

Compare contents of two directories.

version status dependencies devDependencies

Usage

var test = require('tape')
var compare = require('compare-directory')
var path = require('path')
var fixtures = path.resolve.bind(path, __dirname, 'fixtures')
 
test('compare directories', function(t) {
  compare(t, ['**/*.css', '**/*.png'], fixtures('actual'), fixtures('expected'))
  t.end()
})
 
test('normalize', function(t) {
  compare(t, ['**/*.css', '**/*.scss', '**/*.png'], fixtures('normalize'), fixtures('expected'), function (file) {
    if (path.extname(file) !== '.scss') {
      return file
    }
    return path.join(
      path.dirname(file), path.basename(file, '.scss') + '.css'
    )
  })
  t.end()
})
 

Readme

Keywords

Package Sidebar

Install

npm i compare-directory

Weekly Downloads

3

Version

1.1.0

License

MIT

Last publish

Collaborators

  • zoubin