Socket
Socket
Sign inDemoInstall

directory-layout

Package Overview
Dependencies
9
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.1 to 1.0.2

bin/index.js

9

package.json
{
"name": "directory-layout",
"version": "1.0.1",
"version": "1.0.2",
"description": "Verifies directory layout for existence of files and folders in specified positions",
"main": "lib/verify.js",
"main": "lib/index.js",
"author": "Apoorv Saxena",

@@ -12,8 +12,7 @@ "license": "MIT",

"bin": {
"verify": "bin/verify.js",
"generate": "bin/generate.js"
"directory-layout": "bin/index.js"
},
"repository": {
"type": "git",
"url": "https://github.com/ApoorvSaxena/grunt-directory-layout"
"url": "https://github.com/ApoorvSaxena/directory-layout"
},

@@ -20,0 +19,0 @@ "dependencies": {

@@ -1,17 +0,59 @@

### Directory Layout Verifier
Directory Layout [![npm version](https://badge.fury.io/js/directory-layout.svg)](https://badge.fury.io/js/directory-layout)
=====
Verify your build's directory layout
***
Project builds can be complex, and the size and structure of the final build directory may be equally complex. While unit testing helps to ascertain if code is intact, "Directory Layout Verifier" tests that the build has resulted in correct creation of files / directories at respective positions, which otherwise takes unnecessary time to debug in case the build failed partially.
Creation of directory structure is also automated, checkout our [tests](https://github.com/ApoorvSaxena/directory-layout/tree/master/test) folder for further understanding.
Creation of directory structure is also automated, checkout our [tests](https://github.com/ApoorvSaxena/directory-layout/tree/master/test).
We've used markdown syntax to store the directory structure, easy for you to verify visually. Here's an [example](https://raw.githubusercontent.com/ApoorvSaxena/directory-layout/master/test/output/layout.md).
##### Usage:
Installation
-----
- NPM: `npm install -g directory-layout`
Usage:
-----
### From the command line: ###
Usage: `directory-layout [options] <path, ...>`
Options:
-h, --help output usage information
-V, --version output the version number
-g, --generate <path> <output-directory-layout-file-path> Generate directory layout
-v, --verify <input-directory-layout-file-path> <path> Verify directory layout
Example for *directory layout generation*:
```
$ directory-layout -g test/fixtures output.md
Generating layout for test/fixtures...
Layout generated at: output.md
```
Example for *directory layout verification*:
```
$ directory-layout -v output.md test/fixtures
Verifying layout for test/fixtures ...
Successfully verified layout available in output.md.
```
### Within node: ###
For directory layout generation:
```
var LayoutGenerator = require('../lib/generate.js');
var DirectoryLayout = require('directory-layout');
LayoutGenerator
DirectoryLayout
.generate('test/fixtures/', {

@@ -28,8 +70,8 @@ output: './test/output/layout.md',

For layout verification:
For directory layout verification:
```
var LayoutVerifier = require('../lib/verify.js');
var DirectoryLayout = require('directory-layout');
LayoutVerifier
DirectoryLayout
.verify('test/output/layout.md', {

@@ -49,3 +91,5 @@ root: './test/fixtures'

##### Coming soon:
- Grunt and Gulp tasks
Coming soon:
-----
Grunt and Gulp tasks

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

var LayoutGenerator = require('../lib/generate.js');
var DirectoryLayout = require('../lib/index.js');
LayoutGenerator
DirectoryLayout
.generate('test/fixtures/', {

@@ -5,0 +5,0 @@ output: './test/output/layout.md',

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

var LayoutVerifier = require('../lib/verify.js');
var DirectoryLayout = require('../lib/index.js');
LayoutVerifier
DirectoryLayout
.verify('test/output/layout.md', {

@@ -5,0 +5,0 @@ root: './test/fixtures'

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc