npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

folder-creator

v1.0.1

Published

This tool will help user create a set of folders described as a JSON

Downloads

3

Readme

What is folder-creator:

Folder creator is a command line tool that allows you to generate folders and files from a saved template. Templates can be a JSON file. The tool also allows you to templatize the names and contents of the files and folders.

Installation

npm install -g folder-creator

Ensure that -g option is used otherwise the tool will not be available outside the installed folder.

Example: Creating a template

fct -ct myfolderstructure.json

The above command will create a json containing the current folder structure along with all the files and its contents.

Example: Creating and saving a template

fct -ct -st myfolderstructure

The above command will create the template and save it within the tool with the name myfolderstructure. No local files are created.

Example: Parameterizing a value while creating the template

fct -ct -n main -st myfolderstructure

The above command will replace 'main' with '<name>' and 'Main' with '<Name>' while creating the template.

Example: creating folders from a template file

fct -t c:/mytemplates/myfolderstructure.json

The above command will create the folder structure stored in the file 'c:/mytemplates/myfolderstructure.json'. The folders will be created in the current folder.

Example: creating folders from saved template

fct -tn myfolderstructure

The above command will create the folder structure from the saved template 'myfolderstructure'. The folders will be created in the current folder.

Example: creating folders with specific name

fct -tn myfolderstructure newFolderName

The above command will create the folder structure from the saved template 'myfolderstructure'. The folders will be created in a new folder with name 'newFolderName'. In the template '<name>' will be replaced with 'newFolderName' and '<Name>' will be replaced with 'NewFolderName'.

Example: creating folders with specific paramerter

fct -tn myfolderstructure -n main newFolderName

The above command will create the folder structure from the saved template 'myfolderstructure'. The folders will be created in a new folder with name 'newFolderName'. In the template '<name>' will be replaced with 'main' and '<Name>' will be replaced with 'Main'.

Usage

folder-creator [options] [argument]

Full options list

|Options|Description| | ----------- | ----------- | |-t, --templatePath <template-path> |Provide the location to json file containing the template to generate. |-ct, --createTemplate |Will iterate through the directory and create a template. If used with --saveTemplate option it will save the created template. Otherwise, will use the argument to save thee file. |-st, --saveTemplate <template-name>|Saves (overwrites if exists) the template with the given name. Must be used with --templatePath option. Folder template is not created. |-tn, --templateName <template-name>|Create the folder template using the template saved with the given name. |-n, --name <name> |When used with -ct / --createTemplate this would replace the provided text with <name> before the template is saved. Otherwise this would replace all <name> in the template with the provided option. If not provided it will be replaced with the argument. |-d, --default|Create using default template. If no default is set this will create an empty folder if an argument is provided. |-v, --verbose |Show detailed messages. |-md, --makeDefault <make-default> |will make the provided template name as default. This will override the previous default. |-h, --help |display help for command

Templates already included

|Name|Description| | ----------- | ----------- | |vanilajs|Creates a folder structure for a basic browser js project, name is parameterized.| |nodejs|Creates a folder structure for a basic nodejs project, name is parameterized.| |reactjs|Creates a folder structure for a reactjs project, name is parameterized.| |rcc|Creates reactjs class component with a linked css file| |rfc|Creates reactjs functional component with a linked css file|