uoli
v1.0.7
Published
Quickly switch between projects, changing the HOSTS file and the Templatecache templates
Readme
UOLI
Quickly switch between projects, changing the HOSTS file and the Templatecache templates
Just run uoli project-a or uoli project-b to change you TCL templates and HOSTS file for the given projects
Pre requisites
- You will need to have Node.js installed on your machine
- Define the environment variable
TCLPATHheading to the templatecache-local root dir, e.g./Users/{username}/templatecache-localorC:\templatecache-local - Create a directory to store your HOSTS files, e.g.
/Users/{username}/hostsorc:\hosts - Define the environment variable
HOSTSPATHheading to the HOSTS directory you have created - Make sure you have administration permissions in the following files and directories:
- Templatecache-local directory
- Your HOSTS directory
- the HOSTS file
Instalation
- Run
$ npm install uoli -g - Mac users may need to run it with sudo
Usage
Create a project:
To create a new project, set your HOSTS file and templates directory the way you want your project to be and run:
$ uoli create foo- This will:
- Copy your current
HOSTSfile content into afoo.hostsfile created on your HOSTS directory - Copy your current
templatesdirectory content into atemplates-foodirectory created on your TCL
- Copy your current
- This will:
$ uoli create foo tcor$ uoli create foo host- Will do only the
tcor thehostsparts, respectively
- Will do only the
Switch projects
After creating your projects, you can switch between them, running:
$ uoli foo- This will:
- Copy the
foo.hostscontent into yourHOSTS file - Create a symbolic link from the
templates-foodirectory to thetemplatesdirectory
- Copy the
- This will:
$ uoli foo tcor$ uoli foo host- Will do only the
tcor thehostsparts, respectively
- Will do only the
