1.0.4 • Published 3 years ago

bdff v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

bdff

Make Build and initiates default folders directories and files.

Make Initial Folders

with this simple code you can make folders and directories easily. this package first checks if directory is exists or not if not exists makes directory. You can input list of folders that you want to create by array.

bdff.mkdir(["Test", "Test/Inner", "Test/Inner2"]);

// Created Directories :
// Test/
// Test/Inner/
// Test/Inner2/

You can just input single string and make single directory.

bdff.mkdir("WithString");

// Created Directories :
// WithString/

Make Initial Files

This package cheks if given file does not exists and creates file with default value.

bdff.writeFile([
  {
    name: "Test/array.json",
    data: JSON.stringify([]),
  },
  {
    name: "Test/file.txt",
    data: "Simple Text",
  },
]);

// Created Files :
// Test/array.json => []
// Test/file.txt => Simple Text

You can use this method by one object.

bdff.writeFile({
  name: "Test/singleObject.json",
  data: JSON.stringify({}),
});

// Created Files :
// Test/singleObject.json => {}
1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago