{"_id":"5635b292d209b50d0031dfd1","category":{"_id":"5635b291d209b50d0031dfc8","pages":["5635b292d209b50d0031dfd1","5635b292d209b50d0031dfd2","5635b292d209b50d0031dfd3","5635b292d209b50d0031dfd4"],"project":"550a7754635c660d0052808e","__v":1,"version":"5635b290d209b50d0031dfc4","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-05-15T05:15:10.574Z","from_sync":false,"order":3,"slug":"internals","title":"Internals"},"user":"5469e5dfa3b67a0e00559b06","githubsync":"","project":"550a7754635c660d0052808e","__v":0,"version":{"_id":"5635b290d209b50d0031dfc4","__v":1,"project":"550a7754635c660d0052808e","createdAt":"2015-11-01T06:34:56.868Z","releaseDate":"2015-11-01T06:34:56.868Z","categories":["5635b291d209b50d0031dfc5","5635b291d209b50d0031dfc6","5635b291d209b50d0031dfc7","5635b291d209b50d0031dfc8","5635b291d209b50d0031dfc9","5635b291d209b50d0031dfca"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"0.25.0","version":"0.25"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-05-18T01:39:11.512Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":29,"body":"Telescope tries to maintain a fairly consistent organization and file structure.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Package Types\"\n}\n[/block]\nIt's important to understand the differences between the various types of packages used by Telescope.\n\n**Third-party Packages** such as [SimpleSchema](https://github.com/aldeed/meteor-simple-schema) or [Iron Router](https://github.com/iron-meteor/iron-router) are generic third-party Meteor packages used in Telescope's codebase. \n\nMost of them are imported by the `telescope:lib` package, and made available to any package that then depends on `telescope:lib`. \n\n**Core Packages** are Telescope packages that are necessary for the app to function properly. They are all grouped under the `telescope:core` package. \n\n**Optional Packages** are Telescope packages that can be removed to disable specific features, such as notifications, categories, or the newsletter. Although optional, they are generally included by default when installing Telescope. \n\n**Custom Packages** are packages created by end users to adapt Telescope to their needs. Unlike the previous three types of packages, they are generally not hosted on [Atmosphere](http://atmospherejs.com), but instead live in the app's local `/packages` directory. \n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Package Structure\"\n}\n[/block]\nThe typical Telescope package uses the following directory structure:\n\n```\n/lib\n  /client\n    /templates\n    /stylesheets\n  /server\n```\n\nCode that should run on both the client and server is stored at the root of `/lib`. Other files are stored in either `/client` or `/server`, according to where they should run. \n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Naming Conventions\"\n}\n[/block]\nTelescope's codebase follows the following conventions:\n\n-**camelCase** for JavaScript code (`myVariable`).\n-**dashes** for CSS code (`my-class`).\n-**underscores** for file names (`my_file.html`).\n\nThe one exception to this rule is **template naming**. Since Telescope usually follows a one file = one template convention, template also use **underscores** (`my_template`)) instead of camelCase. As an added benefit, this makes it possible to know at a glance that an object is a template.","excerpt":"","slug":"architecture","type":"basic","title":"Architecture"}
Telescope tries to maintain a fairly consistent organization and file structure. [block:api-header] { "type": "basic", "title": "Package Types" } [/block] It's important to understand the differences between the various types of packages used by Telescope. **Third-party Packages** such as [SimpleSchema](https://github.com/aldeed/meteor-simple-schema) or [Iron Router](https://github.com/iron-meteor/iron-router) are generic third-party Meteor packages used in Telescope's codebase. Most of them are imported by the `telescope:lib` package, and made available to any package that then depends on `telescope:lib`. **Core Packages** are Telescope packages that are necessary for the app to function properly. They are all grouped under the `telescope:core` package. **Optional Packages** are Telescope packages that can be removed to disable specific features, such as notifications, categories, or the newsletter. Although optional, they are generally included by default when installing Telescope. **Custom Packages** are packages created by end users to adapt Telescope to their needs. Unlike the previous three types of packages, they are generally not hosted on [Atmosphere](http://atmospherejs.com), but instead live in the app's local `/packages` directory. [block:api-header] { "type": "basic", "title": "Package Structure" } [/block] The typical Telescope package uses the following directory structure: ``` /lib /client /templates /stylesheets /server ``` Code that should run on both the client and server is stored at the root of `/lib`. Other files are stored in either `/client` or `/server`, according to where they should run. [block:api-header] { "type": "basic", "title": "Naming Conventions" } [/block] Telescope's codebase follows the following conventions: -**camelCase** for JavaScript code (`myVariable`). -**dashes** for CSS code (`my-class`). -**underscores** for file names (`my_file.html`). The one exception to this rule is **template naming**. Since Telescope usually follows a one file = one template convention, template also use **underscores** (`my_template`)) instead of camelCase. As an added benefit, this makes it possible to know at a glance that an object is a template.