Skip to content

Instantly share code, notes, and snippets.

@MrJadaml
Created December 12, 2019 19:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MrJadaml/5dbb649caba9558c37439150db8c23fd to your computer and use it in GitHub Desktop.
Save MrJadaml/5dbb649caba9558c37439150db8c23fd to your computer and use it in GitHub Desktop.
const withDirSizes = {
'src': {
size: 42,
ndoes: {
'components': {
size: 42,
nodes: {
'add-to-bag': {
nodes: {
...
},
},
"index.ejs": {
size: 13,
},
},
},
'lib': {
size: 42,
nodes: { },
},
'util': {
size: 42,
nodes: { },
},
"app.js": {
size: 100,
},
"client.js": {
size: 200,
},
"index.ejs": {
size: 300,
},
}
}
}
const withDirSizesArr = {
'src': {
size: 42,
ndoes: [
{
dir: 'components',
size: 42,
nodes: [
{
dir: 'add-to-bag',
size: 777,
nodes: [
{ ... }
],
},
{
file: "index.ejs",
size: 13,
},
],
},
{
file: 'lib',
size: 42,
nodes: [ ],
},
{
dir: 'util',
size: 42,
nodes: [ ],
},
{
file: "app.js",
size: 100,
},
{
file: "client.js",
size: 200,
},
{
file: "index.ejs",
size: 300,
},
]
}
}
const withoutDirSizes = {
'src': {
components: {
'add-to-bag': {
},
"index.ejs": {
size: 13,
},
},
'lib': {
"analytics.js": {
size: 66
},
},
'util': {
"helpers.js": {
size: 6,
},
},
"app.js": {
size: 100,
},
"client.js": {
size: 200,
},
"index.ejs": {
size: 300,
},
}
}
const noDirs = {
"src/components/add-to-bag/index.ejs": {
size: 13,
},
"src/lib/analytics.js": {
size: 66
},
"src/util/helpers.js": {
size: 6,
},
"src/app.js": {
size: 100,
},
"src/client.js": {
size: 200,
},
"src/index.ejs": {
size: 300,
},
}
const noDirsArr = [
{
path: "src/components/add-to-bag/index.ejs",
size: 13,
},
{
path: "src/lib/analytics.js",
size: 66
},
{
path: "src/util/helpers.js",
size: 6,
},
{
path: "src/app.js",
size: 100,
},
{
path: "src/client.js",
size: 200,
},
{
path: "src/index.ejs",
size: 300,
},
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment