A cli tool to initialize and build boilerplates and projects
$ npm i -g sepp
or
$ yarn global add sepp
Forget the times where you git clone a boilerplate or copy a folder and changing packagenames, authors, and readmes. Now just type:
$ sepp start
Create a new folder.
# cd into your project directory
cd path/to/your/projects
# create a new folder
mkdir my-sepp-template
Create a sepp folder inside of your new template file. This is the directory to place al information that it can be used with the sepp
command line interface. This directory will not be copied (e.g. sepp
directory is excluded) if you create a new project with sepp.
# cd into your template directory
cd my-sepp-template
# create a new sepp folder
mkdir sepp
Inside of your sepp directory you can create file called sepp-questions.json
.
# cd into the sepp directory
cd sepp
# create a sepp-questions.json
touch sepp-questions.json
Inside the sepp-questions.json
you can define the variables that you can use inside of your template files.
For the questions we use the library inquirer. When you create a new project with sepp start
you got requested to answer this questions.
{
"questions": [
{
"type": "input",
"name": "projectName",
"message": "The name of your project: "
},
{
"type": "input",
"name": "projectDesc",
"message": "The description of your project: "
},
]
}
Now create your template files. For example, a package.json
file. Inside your templates you can use the variables difined inside your sepp-questions.json
as name
.
{
"name": "{{projectName}}",
"version": "0.0.0",
"description": "{{projectDesc}}"
}
Use this template with sepp
.
You can either create a .sepp/templates
folder and copy/paste my-sepp-template
into this directory or you can push it to a remote git repositiry and use sepp add to add it to your .sepp/templates
directory.
If you decide to make it available as a public sepp template, you can host your sepp template
on github and add the tags sepp
and template
to this repository, and anyone using sepp
can find your sepp template
using sepp search
.
Sepp was build to be as simple as possible, so there are just a few commands you need to know.
Sepp was build to be as simple as possible, so there are just a few options you need to know.
With sepp start
you can create a new project.
This command will search for templates inside your home directory
for a .sepp/templates
directory. This is the place where you can save your templates. You can either add them manually or by adding git repositories
via the sepp add <url>
command.
# create a new project
$ sepp start
With sepp add <url>
you can add new template project from any git remote repository.
This command will search for the repository behind the <url>
you provided and clone it to .sepp/templates
. If you use username/repositoryname
, this command will search by default repositories on github.
# add the node-module template
$ sepp add aichbauer/node-module
With sepp remove
you can remove a installed sepp template
.
# remove the node-module template
$ sepp remove node-module
With sepp search
you can display all sepp templates
available on github.
# list all available templates on github
$ sepp search
With sepp list
you can display all sepp templates
that are installed.
# list all installed templates
$ sepp list
With sepp version
you can display the current version of sepp
.
# current version
$ sepp version
With sepp --help
you can display usage of sepp.
# usage of cli
$ sepp --help
MIT © Lukas Aichbauer