{
	"project": {
		"parameters": {
			"project_name": "iThoughts Advanced Code Edior",
			"author": "Gerkin",
			"documentation": {
				"base": {
					"url": "http://documentation.gerkindevelopment.net/wp-plugins/ithoughts-advanced-code-editor/",
					"path": "/mnt/mutualized/work/php/wp-plugins/doc/ithoughts-advanced-code-editor/"
				},
				"format": [
					"%BASE%",
					"%VERSION_MINOR%",
					"%TYPE%"
				],
				"resources": {
					"url": "http://documentation.gerkindevelopment.net/wp-plugins/ithoughts-advanced-code-editor/resources/",
					"path": "/mnt/mutualized/work/php/wp-plugins/doc/ithoughts-advanced-code-editor/resources/"
				}
			},
			"company": {
				"start": "2015",
				"name": "GerkinDevelopment"
			}
		},
		"commands": {
			"_default": {
				"awake": true,
				"command_group": false,
				"eventListeners": [
					{
						"action": "less-compile",
						"data": {
							"browsers": [
								"> 1%",
								"IE 8",
								"last 2 versions"
							],
							"from": "^(.*\\/)?less\\/(.*)\\.less$",
							"to": "$1css/$2.css"
						},
						"events": {
							"onchange": {
								"selection": {
									"\\.less$": true,
									"^\\.\\/submodules": false
								},
								"warmup": false
							}
						},
						"next": {
							"action": "minify",
							"data": {
								"from": "^(.*)(\\.(?:cs|j)s)$",
								"to": "$1.min$2"
							}
						}
					},
					{
						"action": "minify",
						"data": {
							"from": "^(.*)(\\.(?:cs|j)s)$",
							"to": "$1.min$2"
						},
						"events": {
							"onchange": {
								"selection": {
									"^(.*)(\\.(?:cs|j)s)$": true,
									"^(.*\\/)?docs\\/(.*\\.(?:cs|j)s)$": false,
									"\\.min\\.(cs|j)s$": false,
									"^\\.\\/submodules": false
								},
								"warmup": false
							}
						}
					}
				]
			},
			"documentate": {
				"parameters": {
					"version": {
						"_type": "prompt"
					},
					"version_minor": {
						"_type": "regex_replace",
						"value": "${ version }",
						"search": "^(\\d+)\\.(\\d+).*",
						"replacement": "$1.$2"
					},
					"version_minor": {
						"_type": "regex_replace",
						"value": "${ version }",
						"search": "^(\\d+)\\.(\\d+).*",
						"replacement": "$1.$2"
					}
				},
				"command_group": true,
				"actionGroup": {
					"mode": "parallel",
					"actions": [
						{
							"action": "phpdoc",
							"data": {
								"private": true,
								"selection": {
									"\\.(php)$": true,
									"^\\.\\/submodules($|\\/)": false,
									"^\\.\\/submodules\\/iThoughts-WordPress-Plugin-Toolbox": true
								},
								"project_name": "${ project_name }",
								"author": "${ author }",
								"target_path": "${ documentation.base.path }${ version_minor }/php/"
							}
						},
						{
							"action": "jsdoc",
							"data": {
								"private": true,
								"selection": {
									"\\.(js)$": true,
									"\\.min\\.(js)$": false,
									"^\\.\\/docs($|\\/)": false
								},
								"template": "default",
								"typepath": "javascript",
								"destinationPath": "${ documentation.base.path }${ version_minor }/",
								"basePath": "${ documentation.base.path }${ version_minor }/"
							}
						},
						{
							"action": "version-history",
							"data": {
								"basePath": "${ documentation.base.path }",
								"template": "gerkindevelopment",
								"version_minor": "${ version_minor }",
								"versionUrl": "${ documentation.base.url }${ version_minor }",
								"project_name": "${ project_name }",
								"author": "${ author }",
								"resourcesUrl": "./resources"
							}
						},
						{
							"action": "ithoughts-index-doc",
							"data": {
								"template": "gerkindevelopment",
								"head_links": {
									"GerkinDevelopment": "https://www.gerkindevelopment.net/",
									"Back to Documentation Index": "/"
								},
								"doc_links": [
									{
										"labels": {
											"main": "JavaScript",
											"sub": "Client-Side"
										},
										"image": "/images/clientside.jpg",
										"link": "javascript/index.html"
									}
								],
								"project_name": "${ project_name }",
								"author": "${ author }",
								"version": "${ version_minor }",
								"company_start": "${ company.start }",
								"root": "${ documentation.base.url }",
								"baseUrl": "${ documentation.base.url }${ version_minor }",
								"basePath": "${ documentation.base.path }${ version_minor }",
								"resourcesUrl": "../resources",
								"resourcesPath": "${ documentation.base.path }resources"
							}
						},
						{
							"action": "version-history",
							"data": {
								"basePath": "${ documentation.base.path }",
								"template": "gerkindevelopment",
								"version_minor": "${ version_minor }",
								"versionUrl": "${ documentation.base.url }${ version_minor }",
								"project_name": "${ project_name }",
								"author": "${ author }",
								"resourcesUrl": "./resources"
							}
						}
					]
				}
			},
			"release": {
				"parameters": {
					"version": {
						"_type": "prompt"
					},
					"versionMessage": {
						"_type": "prompt"
					},
					"version_minor": {
						"_type": "regex_replace",
						"value": "${ version }",
						"search": "^(\\d+)\\.(\\d+).*",
						"replacement": "$1.$2"
					}
				},
				"description": "Makes a release by pre-commiting on git, updating file versions, post-commit & push",
				"command_group": true,
				"actionGroup": {
					"mode": "serie",
					"actions": [
						{
							"action": "git",
							"data": {
								"actions": [
									{
										"action": "commit",
										"data": {
											"message": "Pre-process version ${ version }"
										}
									}
								]
							}
						},
						{
							"action": "files-version",
							"data": {
								"selection": {
									"\\.(js)$": true,
									"\\.min\\.(js)$": false,
									"^\\.\\/ext\\/": false,
									"^\\.\\/js\\/tinymce": false,
									"^\\.\\/docs($|\\/)": false
								},
								"setDiffs": {
									"/(@version\\s+)\\d+(\\.\\d+)*": "$1$ { version }"
								},
								"targetVersion": "${ version }",
								"companyName": "${ company.name }"
							}
						},
						{
							"command_group": true,
							"mode": "parallel",
							"actions": [
								{
									"action": "phpdoc",
									"data": {
										"private": true,
										"selection": {
											"\\.(php)$": true,
											"^\\.\\/submodules($|\\/)": false,
											"^\\.\\/submodules\\/iThoughts-WordPress-Plugin-Toolbox": true
										},
										"project_name": "${ project_name }",
										"author": "${ author }",
										"target_path": "${ documentation.base.path }${ version_minor }/php/"
									}
								},
								{
									"action": "jsdoc",
									"data": {
										"private": true,
										"selection": {
											"\\.(js)$": true,
											"\\.min\\.(js)$": false,
											"^\\.\\/node_modules($|\\/)": false,
											"^\\.\\/docs($|\\/)": false
										},
										"template": "default",
										"typepath": "javascript",
										"destinationPath": "${ documentation.base.path}${ version_minor }/",
										"basePath": "${ documentation.base.path }/${ version_minor }/"
									}
								},
								{
									"action": "ithoughts-index-doc",
									"data": {
										"template": "gerkindevelopment",
										"head_links": {
											"GerkinDevelopment": "https://www.gerkindevelopment.net/",
											"Back to Documentation Index": "/"
										},
										"doc_links": [
											{
												"labels": {
													"main": "JavaScript",
													"sub": "Client-Side"
												},
												"image": "/images/clientside.jpg",
												"link": "javascript/index.html"
											}
										],
										"project_name": "${ project_name }",
										"author": "${ author }",
										"version": "${ version_minor }",
										"company_start": "${ company.start }",
										"root": "${ documentation.base.url }",
										"baseUrl": "${ documentation.base.url }${ version_minor }",
										"basePath": "${ documentation.base.path }${ version_minor }",
										"resourcesUrl": "../resources",
										"resourcesPath": "${ documentation.base.path }resources"
									}
								},
								{
									"action": "version-history",
									"data": {
										"basePath": "${ documentation.base.path }",
										"template": "gerkindevelopment",
										"version_minor": "${ version_minor }",
										"versionUrl": "${ documentation.base.url }${ version_minor }",
										"project_name": "${ project_name}",
										"author": "${ author }",
										"resourcesUrl": "./resources"
									}
								}
							]
						},
						{
							"command_group": true,
							"mode": "parallel",
							"actions": [
								{
									"action": "exec",
									"data": {
										"command": "rsync -az --delete --exclude=\".*/\" --exclude=\".*\" . ../../svn/ithoughts-advanced-code-editor/trunk/"
									}
								},
								{
									"command_group": true,
									"mode": "parallel",
									"actions": [
										{
											"action": "svn",
											"data": {
												"path": "../../svn/ithoughts-advanced-code-editor",
												"actions": [
													{
														"action": "cp",
														"data": {
															"from": "trunk",
															"to": "tags/${ version }"
														}
													},
													{
														"action": "commit",
														"data": {
															"message": "Release version ${ version }: ${ versionMessage }"
														}
													}
												]
											}
										},
										{
											"action": "git",
											"data": {
												"actions": [
													{
														"action": "commit",
														"data": {
															"message": "Release version ${ version }: ${ versionMessage }"
														}
													},
													{
														"action": "tag",
														"data": {
															"label": "v${ version }",
															"message": "Release version ${ version }: ${ versionMessage }"
														}
													},
													{
														"action": "push",
														"data": {}
													}
												]
											}
										}
									]
								}
							]
						}
					]
				}
			},
			"refresh_resources": {
				"awake": true,
				"command_group": false,
				"eventListeners": [
					{
						"action": "less-compile",
						"data": {
							"browsers": [
								"> 1%",
								"IE 8",
								"last 2 versions"
							],
							"from": "^(.*\\/)?less\\/(.*)\\.less$",
							"to": "$1css/$2.css"
						},
						"events": {
							"onchange": {
								"selection": {
									"\\.less$": true,
									"^\\.\\/submodules": false
								},
								"warmup": true
							}
						},
						"next": {
							"action": "minify",
							"data": {
								"from": "^(.*)(\\.(?:cs|j)s)$",
								"to": "$1.min$2"
							}
						}
					},
					{
						"action": "minify",
						"data": {
							"from": "^(.*)(\\.(?:cs|j)s)$",
							"to": "$1.min$2"
						},
						"events": {
							"onchange": {
								"selection": {
									"^(.*)(\\.(?:cs|j)s)$": true,
									"^(.*\\/)?docs\\/(.*\\.(?:cs|j)s)$": false,
									"\\.min\\.(cs|j)s$": false,
									"^\\.\\/submodules": false
								},
								"warmup": true
							}
						}
					}
				]
			}
		}
	}
}