laadur (CLI)
Intro
When you are doing routine work, you may need a tool which will simplify your workflow.
So became laadur.
Laadur creates a folder in your homepath (/Users/{user}/.laadur) and keeps there your templates.
Now it works via CLI. So, it can't be required in your project or smth else. Yet.
Using
Installation
Managing
Search
Targetting
Multiloading
Debugging
Installation
gem install laadurSo, now you are ready.
To create your first template, you can use
laadur -owhich will open your laadur folder with finder.
Simply create several folders there with some content.
For example, folders like:
Here you go.
Now you can get this templates from wherever you are.
Simply use:
[ ~ ]: cd blog
[ ~/blog ]: laadur -l bootstrapIt will load the content of bootstrap folder to your present working directory (pwd).
Managing
You can remotely get access to some laadur data.
Get laadur folder path: laadur --folder.
Get list of all templates: laadur --list.
And remove certain template: laadur -r bootstrap.
Search
Laadur can load several templates, using regular expression.
[ ~/blog ]: laadur --list
There are 4 templates:
├ jquery
├ jquery-mobile
├ sass-mixins
└ sass-mixins-mobile
[ ~/blog ]: laadur -s *-mobile
jquery-mobile loaded!
sass-mixins-mobile loaded!You can also load all templates using --all.
Targetting
By default laadur loads files to your pwd.
If you wanna change destination folder, use -t/--target.
In version 1.0 you should specify target before specifying template!
Look:
[ ~ ]: cd blog
[ ~/blog ]: laadur -t assets -l bootstrapLaadur will copy the content from .laadur/bootstrap and paste it to the ~/blog/assets folder. If folder doesn't exist, it will create it for you.
If you need to choose destination folder not from pwd, you can set --home option, and laadur will search target folder from your home directory.
For example:
[ ~/blog/assets/img/png/16x16 ]: laadur --home -t blog/assets -l bootstrapMultiloading
Multiloading is disabled in the actual version, but you still can use it but in a little different way.
[ ~/blog ]: laadur -l bootstrap/css -l bootstrap/jsDebugging
If you are not sure, you can first check, where your files will be loaded to:
[ ~/blog ]: laadur --home -t another/path --prtIt will acts as you're going to copy.
But --prt option will simply print destination path instead of copying files.
Options
-v, --version show version
-h, --help help window
--docs open github documentation page
-o, --open open laadur folder with Finder.app
--list list all templates
--folder print folder path
-t, --target <path> specify target folder for copying template files (also see --home)
--home use home folder as root for target option (pwd by default)
--pwd return back home as pwd (useful with multiloading)
--prt print target path (where files will be copied)
-s, --search <expr> search templates with regex
--all load all templates
-l, --load <template> load template from repository
you may not specify this flag
-r, --remove <template> remove a certain template