kaidez's personal project scaffolding tool
kdz is a Node build tool I created for scaffolding out my projects.
Before you install
kdz is not available as a downloadable npm module so if you want to install it, you will need to clone this repo to your machine first. Therefore, please note the following:
This tool has been tested on Unix-like systems only. Testing it on Windows machines is listed in the todo section.
There shouldn't be an npm tool or module called
kdzalready installed on your machine. So you should be able to install it with no issues but just to be sure, run
which kdzin your terminal. If it doesn't say the file is installed somewhere, you're ok. If it does, PLEASE LET ME KNOW ASAP!!
This tool downloads files from a pre-defined root link in
kdz.jsthat points to my GitHub repo. If you want to change that link, you would have to change the
I'm assuming that you have Node/npm installed on the machine to which you're downloading this tool. If not, please get Node & npm.
How it works
kdz uses a small set of commands and options to scaffold a basic web application based on the methods and tricks I commonly use for web development. It creates files & folders and also downloads specific files from this repo.
How to install
Open a terminal window and clone this repository somewhere on your local machine:
git clone https://github.com/kaidez/kdz.git
Navigate to the repo in your terminal and install it...you may need to do this using
npm install -g
From here, run
kdz app whenever you want from whatever folder you want.
kdz app scaffolds out a single-page-application (SPA) by performing the following steps:
buildfolder is created with
coffeefolder is created and includes a
css-buildfolder is created with an
- and empty
image-minfolder is created (images that need to be minified go here)
STYLEGUIDE.mdfiles are downloaded from the
package.jsonfiles are downloaded from the
--test flag is attached to
kdz app, a
test-build folder is created, then a test scaffold is created in that folder.
kdz dt is a quick way of deleting
Scaffolds out a WordPress-like project. It performs almost the same tasks as
kdz app with the following differences:
buildfolder and its subdirectories are not created.
package.jsonfiles that are downloaded are more geared toward WordPress development and downloaded from
functions.phpfile is downloaded.
.gitignore file from
source-spa to the root folder. If the
-w option is passed,
.gitignore will be WordPress-specific and downloaded from the
Downloads LESS files from
css-build/imports If the
-w option is passed, the LESS files will be WordPress-specific and downloaded from the
Downloads Sass files from
css-build/imports If the
-w option is passed, the Sass files will be WordPress-specific and downloaded from the
Creates a folder called
test-build and creates a test scaffold.
test-build is listed as "non-commitable" in
kdz uses an older version of the download module, which is used to download files from my GitHub repo. This is because it currently causes errors when used with the download-status module, which is displays a progress bar for an individual download....read more about this here. I'll watch for if/when this is fixed, then update it.
To get help
kdz --help in your terminal. The following will be outputted:
Usage: kdz [options] [command] Commands: app scaffold a basic web application dt delete "test-build" folder Options: -h, --help output usage information -V, --version output the version number -w, --wordpress create a WordPress project -g, --gitignore download ".gitignore" file -l, --less download LESS files in "css-build" -s, --scss download Sass files in "css-build" -t, --test do a test scaffold in "test-build"
kdz is still new so there are some things I'd still like/want to do:
- See how the promises can be made to work better.
- The folder-existence check isn't accurate...make it more accurate.
- Create specific commands for both the LESS and Sass downloads...don't make them work with just an option.
- Perform error handling when flags are passed improperly.
- See how templates can be used.
- Test on Windows machines.
- See if pointing to GitHub files with the GitHub API is better than pointing to them directly.
- See if a reusable function can be created for tasks related to
- Add prompt functionality so things like
package.jsoncan be customized.