成人无码视频,亚洲精品久久久久av无码,午夜精品久久久久久毛片,亚洲 中文字幕 日韩 无码

資訊專欄INFORMATION COLUMN

一句指令,得到好看的目錄樹!

junnplus / 2847人閱讀

摘要:想要輕松獲取目錄樹字符串嗎現(xiàn)在一句話就可以搞定

想要輕松獲取目錄樹字符串嗎?現(xiàn)在一句話就可以搞定

moyu/
├── Applications/
├── consolas/
├── Desktop/
├── Documents/
├── Downloads/
├── inttuplus/
├── Library/
├── Movies/
├── Music/
├── my-code/
├── others-code/
├── Pictures/
└── Public/

13 directories, 0 files.

npm i -g print-dir && pdir ~ -m 1

Bash

pdir [.] [-t ./theme.json] [--igd "node,theme"] [--sort dir] [-o ./out.txt] [-m 5]

Package
after npm install print-dir --save

var dirTree  = require("print-dir")

let treeData = dirTree({
    dir: ".",
    theme: {
       "node": "├── ",
       "pipe": "│   ",
       "last": "└── ",
       "indent": "    ",
       "dir_suffix": "/"
    },
    maxLev: 2,
    ignoresFile: [],
    ignoresDir: [],
    prefix: " ",
    isLine: false, // don"t print line by line
    sort: ""
})
/*
 return 
treeData.treeString
treeData.infoString
treeData.fileNum
treeData.dirNum
*/

Default Options

const default_options = {
    t: path.resolve(__dirname, "./themes/default.json"), // theme of char
    _: [process.cwd()],           // directory
    igf: "",                    // ignores files (regular expression matching)
    igd: "",                    // ignores dirs (regular expression matching)
    prefix: "",                 // prefix of each line
    pa: false,                  // print all at once
    sort: ""                    // file sort by "file"/"dir", default is sort by filename.
    // o: "./out.txt"           // store where
    //m: 1                      // max Level 
}

Default Characters

{
    "node": "├── ",
    "pipe": "│   ",
    "last": "└── ",
    "indent": "    ",
    "dir_suffix": "/"
}

文章版權(quán)歸作者所有,未經(jīng)允許請勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。

轉(zhuǎn)載請注明本文地址:http://m.hztianpu.com/yun/81296.html

相關(guān)文章

  • 太原面經(jīng)分享:如何在vue面試環(huán)節(jié),展示你晉級阿里P6+技術(shù)功底?

    摘要:假如你通過閱讀源碼,掌握了對的實現(xiàn)原理,對生態(tài)系統(tǒng)有了充分的認識,那你會在面試環(huán)節(jié)游刃有余,達到晉級阿里的技術(shù)功底,從而提高個人競爭力,面試加分更容易拿。 前言 一年一度緊張刺激的高考開始了,與此同時,我也沒閑著,奔走在各大公司的前端面試環(huán)節(jié),不斷積累著經(jīng)驗,一路升級打怪。 最近兩年,太原作為一個準二線城市,各大互聯(lián)網(wǎng)公司的技術(shù)棧也在升級換代,假如你在太原面試前端崗位,而你的技術(shù)庫里若...

    xiaoqibTn 評論0 收藏0
  • 使用Ghost搭建個人博客

    摘要:使用搭建個人博客作為一個技術(shù)人員,一般都會有寫一些博客,分享一些文章咱們做技術(shù)的就是愛分享。下面我就簡單講解一下在系統(tǒng)下如何使用搭建搭建個人博客網(wǎng)站。 使用Ghost搭建個人博客 作為一個技術(shù)人員,一般都會有寫一些博客,分享一些文章(咱們做技術(shù)的就是愛分享)。因此也誕生了非常多的開源博客系統(tǒng),比如像wordpress也是目前世界最流行,應(yīng)用最廣的一個天源博客系統(tǒng),有非常多的插件及模版。...

    Developer 評論0 收藏0

發(fā)表評論

0條評論

junnplus

|高級講師

TA的文章

閱讀更多
最新活動
閱讀需要支付1元查看
<