Running the Standalone Designer - tooltwist/documentation GitHub Wiki
Update November 2014: The ToolTwist CLI is still being fine tuned, so documentation might vary slightly from the version downloaded from npm
The standalone Designer can be run from any location, with minimal setup.
Before starting, you should have Java, Nodejs, Ruby 2.0 and ImageMagick installed on your machine.
Installing Tooltwist-cli
sudo npm install -g tooltwist
Running the demo project
To start, go to a convenient directory (e.g. ~/Development) and initialize tooltwist. This will create a project named myProject to contain all the files related to the Designer. By default it will run the Designer to edit the ttdemo demonstration project.
$ mkdir someDirectory
$ cd someDirectory
$ tooltwist init
...
$ cd myProject
$ tooltwist designer
...
--------------------------------------------------------------------------
MODE: designer
REPOSITORY: https://github.com/twistresources/pundit-webdesign.git
BRANCH: development
--------------------------------------------------------------------------
...
>>>>>>>>>>>>>>>>>> Tooltwist Startup Commencing <<<<<<<<<<<<<<<<<<
>>>>>> ...
>>>>>>>>>>>>>>>>>> Tooltwist Startup Finished <<<<<<<<<<<<<<<<<<<<<
Started Tomcat Server
The Server is running at http://localhost:8080/ttsvr
(Server can be stopped with Control-C)
THE SERVER IS NOW RUNNING.
http://localhost:8080/ttsvr/login
Default log file is /private/tmp/,9/.tooltwist/tooltwist.log
You can now open your browser at http://localhost:8080/ttsvr/login to edit your web design. The first time you enter the Designer you will need to generate images, using Misc->Generate Images.
Running the Designer on your own project
To edit your own web design project in the standalone Designer, edit tooltwist.js and replace the webdesign repo:
exports.config = {
"mode" : "designer",
"webdesign" : {
"name" : "ttdemo",
"repo" : "git://www.github.com/tooltwist/ttdemo.git", <---
"branch" : "master"
},
...
}
Note, August 2014: The branch field is not currently used. See the workaround below.
Run the tooltwist
command again, wait for the server to start and log in. Your project should be accessible by clicking on the project name.
Changing config files
The config files are all generated from templates, which may be overridden. To do so, first run this command:
$ tooltwist example-templates
This will create a directory named tooltwist.templates containing example templates. To override a template, remove the ".example" suffix from a file and make any changes you require. The relevant config file will be updated next time you run tooltwist
.
Problems in the Webdesign project
If you wish to change branch in use for the webdesign project, or the extension projects in use, you can do this from the directory tooltwist/webdesign-projects/projectName.
See Preparing a web design project to change the extension projects.
Don't forget to commit your changes and push them back to Github.
Problems with Gradle
If you encounter problems with Gradle (for example missing dependencies) you can run Gradle from the command line:
$ cd tooltwist/gradle/ttsvr
$ gw -i assemble
A few tips for debugging Gradle builds can be found here.
--