0.0.7 • Published 5 years ago

fs-tree-json v0.0.7

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

fs-tree-json

Introduction

Description

Represent directory tree with json or object.

Demo

How to use

Install

npm i fs-tree-json

Usage

const { tree, treeSync } = require('fs-tree-json');
// async need callback.
tree('.', (result) => {
    console.log(result); // return object only.
});
tree('.', './output.json', (result) => {
    console.log(result); // and output json.
});
// sync slightly faster than async function.
const syncObject = treeSync('.'); // return object only.
const syncJson = treeSync('.', './output.json'); // and output json.

Develop

Linux 環境準備

aurman -S python2
which python2
npm config set python /usr/bin/python2

% gcc --version
gcc (GCC) 9.1.0
% g++ --version
g++ (GCC) 9.1.0

Windows環境準備

インストール

npm i -g windows-build-tools

Visual Studio Build Tools 2017
python 2.7

npm config

npm config set msvs_version 2017
npm config set python "C:\Python27\python.exe"

node-gyp 実行

npm i
npm rebuild node-gyp
npm run build
npm run test

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago