{"__v":9,"_id":"562d247e26a0a10d00ad6bfd","category":{"__v":1,"_id":"562d247b26a0a10d00ad6be7","pages":["562d247e26a0a10d00ad6bfc","562d247e26a0a10d00ad6bfd","562d247e26a0a10d00ad6bfe","562d247e26a0a10d00ad6bff","562d247e26a0a10d00ad6c00","562d247e26a0a10d00ad6c01","562d247e26a0a10d00ad6c02","562d247e26a0a10d00ad6c03","562d247e26a0a10d00ad6c04"],"project":"55ba86e68f4ef01900c0ae1f","version":"562d247a26a0a10d00ad6be2","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-07-30T22:45:50.984Z","from_sync":false,"order":7,"slug":"autocode-elements","title":"Hacking Autocode"},"project":"55ba86e68f4ef01900c0ae1f","user":"55ba86a810133e2b00feb6bc","version":{"__v":10,"_id":"562d247a26a0a10d00ad6be2","project":"55ba86e68f4ef01900c0ae1f","createdAt":"2015-10-25T18:50:34.678Z","releaseDate":"2015-10-25T18:50:34.678Z","categories":["562d247b26a0a10d00ad6be3","562d247b26a0a10d00ad6be4","562d247b26a0a10d00ad6be5","562d247b26a0a10d00ad6be6","562d247b26a0a10d00ad6be7","562d247b26a0a10d00ad6be8","562d247b26a0a10d00ad6be9","566f8106f11d5a0d007226fa","566fb8be1dabd80d00b1206c","566fb8c4cbb2fb0d00f7c4c0","566fb8c9e10ecb0d0004edd0","566fb8ea6995210d003aaa65","566fb8fce10ecb0d0004edd1","566fb901e10ecb0d0004edd2","566fb90e81801f0d00802d60","566fb9126995210d003aaa66"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-07-30T22:53:54.246Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":3,"body":"Specs define how your application should work.\n\nThey are written in YAML. Their structure and validate are determined by [Schemas](doc:schemas).\n\n## Export a Spec\n\nTo create a Spec, go to **Exports** and click **Create Export**:\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/HNslu2DISES396l355rd_Screen%20Shot%202015-12-15%20at%2012.03.04%20AM.png\",\n        \"Screen Shot 2015-12-15 at 12.03.04 AM.png\",\n        \"2560\",\n        \"1600\",\n        \"#8a4630\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\nEnter a **Name** and **Description** and select \"Spec\" as the **Type**.\n\n## Examples\n\nHere is an example spec for the [php.config](https://hub.crystal.sh/php/config) module which generates a `php.ini` file:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"imports:\\n  crystal/php: ~0.2.1\\noutputs:\\n  - generator: php.ConfigGenerator\\n    spec:\\n      include_path: .:/usr/local/lib/php\\n      register_globals: false\\n      track_errors: yes\",\n      \"language\": \"yaml\",\n      \"name\": \"INPUT: config.yml\"\n    },\n    {\n      \"code\": \"include_path = .:/usr/local/lib/php\\nregister_globals = false\\ntrack_errors = yes\",\n      \"language\": \"text\",\n      \"name\": \"OUTPUT: php.ini\"\n    }\n  ]\n}\n[/block]\nHere is an example spec for the [npm.package](https://hub.crystal.sh/npm/package) module which generates a `package.json` file:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"imports:\\n  crystal/npm: ~0.2.5\\noutputs:\\n  - generator: npm.PackageGenerator\\n    spec:\\n      name: my-module\\n      version: 0.1.0\\n      dependencies:\\n        bluebird: latest\",\n      \"language\": \"yaml\",\n      \"name\": \"INPUT: config.yml\"\n    },\n    {\n      \"code\": \"{\\n  \\\"name\\\": \\\"my-module\\\",\\n  \\\"version\\\": \\\"0.1.0\\\",\\n  \\\"dependencies\\\": {\\n    \\\"bluebird\\\": \\\"latest\\\"\\n  }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"OUTPUT: package.json\"\n    }\n  ]\n}\n[/block]\nHere is an example spec for the [bower.package](https://hub.crystal.sh/bower/package) module which generates a `bower.json` file:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"imports:\\n  crystal/bower: ~0.3.5\\noutputs:\\n  - generator: bower.PackageGenerator\\n    spec:\\n      name: my-module\\n      version: 0.1.0\\n      dependencies:\\n        jquery: latest\",\n      \"language\": \"yaml\",\n      \"name\": \"INPUT: config.yml\"\n    },\n    {\n      \"code\": \"{\\n  \\\"name\\\": \\\"my-module\\\",\\n  \\\"version\\\": \\\"0.1.0\\\",\\n  \\\"dependencies\\\": {\\n    \\\"jquery\\\": \\\"latest\\\"\\n  }\\n}\",\n      \"language\": \"json\",\n      \"name\": \"OUTPUT: bower.json\"\n    }\n  ]\n}\n[/block]","excerpt":"Your project's input.","slug":"specs","type":"basic","title":"Specs"}

Specs

Your project's input.

Specs define how your application should work. They are written in YAML. Their structure and validate are determined by [Schemas](doc:schemas). ## Export a Spec To create a Spec, go to **Exports** and click **Create Export**: [block:image] { "images": [ { "image": [ "https://files.readme.io/HNslu2DISES396l355rd_Screen%20Shot%202015-12-15%20at%2012.03.04%20AM.png", "Screen Shot 2015-12-15 at 12.03.04 AM.png", "2560", "1600", "#8a4630", "" ] } ] } [/block] Enter a **Name** and **Description** and select "Spec" as the **Type**. ## Examples Here is an example spec for the [php.config](https://hub.crystal.sh/php/config) module which generates a `php.ini` file: [block:code] { "codes": [ { "code": "imports:\n crystal/php: ~0.2.1\noutputs:\n - generator: php.ConfigGenerator\n spec:\n include_path: .:/usr/local/lib/php\n register_globals: false\n track_errors: yes", "language": "yaml", "name": "INPUT: config.yml" }, { "code": "include_path = .:/usr/local/lib/php\nregister_globals = false\ntrack_errors = yes", "language": "text", "name": "OUTPUT: php.ini" } ] } [/block] Here is an example spec for the [npm.package](https://hub.crystal.sh/npm/package) module which generates a `package.json` file: [block:code] { "codes": [ { "code": "imports:\n crystal/npm: ~0.2.5\noutputs:\n - generator: npm.PackageGenerator\n spec:\n name: my-module\n version: 0.1.0\n dependencies:\n bluebird: latest", "language": "yaml", "name": "INPUT: config.yml" }, { "code": "{\n \"name\": \"my-module\",\n \"version\": \"0.1.0\",\n \"dependencies\": {\n \"bluebird\": \"latest\"\n }\n}", "language": "json", "name": "OUTPUT: package.json" } ] } [/block] Here is an example spec for the [bower.package](https://hub.crystal.sh/bower/package) module which generates a `bower.json` file: [block:code] { "codes": [ { "code": "imports:\n crystal/bower: ~0.3.5\noutputs:\n - generator: bower.PackageGenerator\n spec:\n name: my-module\n version: 0.1.0\n dependencies:\n jquery: latest", "language": "yaml", "name": "INPUT: config.yml" }, { "code": "{\n \"name\": \"my-module\",\n \"version\": \"0.1.0\",\n \"dependencies\": {\n \"jquery\": \"latest\"\n }\n}", "language": "json", "name": "OUTPUT: bower.json" } ] } [/block]