This repository has been archived by the owner on Jan 3, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 58
New Application
wpbasti edited this page Sep 19, 2012
·
3 revisions
Creating new Jasy-enabled projects is easy. It involves executing a single line command (using the built-in create
command in the Console):
$ jasy create --name APPNAME --origin ORIGIN --skeleton SKELETON
In this line replace all upper case words with the actual values you would like to use:
$ jasy create --name myapp --origin git:/zynga/core.git --skeleton application
All parameters to jasy create
are optional.
-
Name:
name
defines the name of the project. It must consists of lowercase characters only. Whenname
is missing Jasy automatically usesmyproject
-
Origin:
origin
defines the source project which offers skeletons. This could be a local folder or a Git URL. If it is missing Jasy checks whether the current working directory is actually a Jasy project it can use. -
Skeleton:
skeleton
defines the name of the skeleton being used. It defaults to the first sub folder insideskeleton
of theorigin
if it is not defined by the user. -
Origin Version:
origin-version
defines a version of the origin project to clone. This is only relevant when auto-cloning the origin from Git. This could be a tag name or branch name like0.8
for a specific release orrefactorui
for a branch name. It automatically tries to figure out whether the given value is a version or branch. If auto handling fails you can use the absolute Git identifier likerefs/heads/refactorui
orrefs/tags/0.8
. -
Destination:
destination
defines the output directory. Normally the output directory is just a folder in the current working directory named likename
. This allows overriding this mechanics.
The scaffolding offers three major features during creating new application from skeletons:
-
Patching: Replaces
$${varname}
placeholders with the actual values inside all files -
Configuration: Stores a configuration
jasyscript.yaml
based on questions/flags defined in the skeleton (jasycreate.yaml/json
). -
Scripting: A custom
jasycreate.py
script to further ask questions of modify the created application further (e.g. renaming folders, loading remote data, etc.)
The process during application creation follows this order:
- Finding skeleton in origin (eventually after automatic cloning)
- Copying a files from skeleton
- Patches all files with available data
- Ask questions defined by
jasycreate.yaml/json
- Ask questions and do scripting implemented in
jasycreate.py
Note: The jasycreate.*
files are removed from the final application during creating the application. These are not relevant for the execution of the application nor any jasy
commands.