From 86480f80673889bfa86e21fcbe3da5fe79cf0733 Mon Sep 17 00:00:00 2001 From: Sashko Stubailo Date: Mon, 27 Oct 2014 01:10:28 -0700 Subject: [PATCH] Add some packages stuff --- docs/client/basic/basic-content.html | 11 ++- docs/client/basic/packages.md | 115 +++++++++++++++++++++++++++ docs/client/basic/toc.html | 2 - docs/client/basic/toc.js | 8 +- 4 files changed, 130 insertions(+), 6 deletions(-) create mode 100644 docs/client/basic/packages.md diff --git a/docs/client/basic/basic-content.html b/docs/client/basic/basic-content.html index 09b409d91d..67c95035ac 100644 --- a/docs/client/basic/basic-content.html +++ b/docs/client/basic/basic-content.html @@ -1,4 +1,13 @@ \ No newline at end of file + {{> basicPackages}} + + {{#markdown}} +# Now read the full documentation + +Congratulations, you're at the end of the Meteor basic docs. For some more +advanced features and more detailed explanations, check out the [Full API +Docs](#/full/). + {{/markdown}} + diff --git a/docs/client/basic/packages.md b/docs/client/basic/packages.md new file mode 100644 index 0000000000..8aa72838c0 --- /dev/null +++ b/docs/client/basic/packages.md @@ -0,0 +1,115 @@ +{{#template name="basicPackages"}} + +# Packages + +Meteor is all about splitting functionality into modular packages. In addition +to the core packages documented above, there are many others that you can add to +your app to enable useful functionality. + +Add or remove packages with `meteor add` and `meteor remove`: + +```bash +# add the less package +meteor add less + +# remove the less package +meteor remove less +``` + +Your app will restart itself automatically when you add or remove a package. +Every app's package dependencies are tracked in `.meteor/packages`, so all of +your collaborators will also get the package when they pull your source code. + +See which packages are used by your app with `meteor list`. + +## Searching for packages + +Currently the best way to search for packages available on the official Meteor +package server is [Atmosphere](https://atmospherejs.com/), the community package +search website maintained by Percolate Studio. You can also search for packages +directly using the `meteor search` command. + +Packages that have a `:` in the name, such as `mquandalle:jade`, are written and +maintained by community members. The prefix before the colon is the name of the +user or organization who created that package. Unprefixed packages are +maintained by Meteor Development Group alongside the Meteor framework. + +There are currently over 2000 packages available on Atmosphere. Below is a small +selection of some of the most useful packages. + +## accounts-ui + +This is a drop-in user interface to Meteor's accounts system. After adding the +package, include it in your templates with `{{dstache}}> loginButtons}}`. The UI +automatically adapts to include controls for any added login services, such as +`accounts-password`, `accounts-facebook`, etc. + +[See the docs about accounts-ui above.](#/basic/accounts). + +## coffeescript + +Use [CoffeeScript](http://coffeescript.org/) in your app. With this package, any +files with a `.coffee` extension will be compiled to JavaScript by Meteor's +build system. + +## email + +Send emails from your app. See the [email section of the full API +docs](#/full/email). + +## mquandalle:jade + +Use the [Jade](http://jade-lang.com/) templating language in your app. After +adding this package, any files with a `.jade` extension will be compiled into +Meteor templates. See the [page on +Atmosphere](https://atmospherejs.com/mquandalle/jade) for details. + +## jquery + +JQuery makes HTML traversal and manipulation, event handling, and animation +easy with a simple API that works across most browsers. + +JQuery is automatically included in every Meteor app since the framework uses it +extensively. See the [JQuery docs](http://jquery.com/) for more details. + +## http + +This package allows you to make HTTP requests from the client or server using +the same API. See the [http docs](#/full/http) to see how to use it. + +## less + +Use the [LESS](http://lesscss.org/) CSS pre-processor in your app. With this +package, `.less` files are automatically compiled into CSS. If you want to use +`@import` to include other files and not have Meteor automatically compile them, +use the `.import.less` extension. + +## markdown + +Include [Markdown](http://daringfireball.net/projects/markdown/syntax) code in your templates. It's as easy as using the `{{dstache}}# markdown}}` helper: + +```html +
+{{dstache}}#markdown}} +# My heading + +Some paragraph text +{{dstache}}/markdown}} +
+``` + +Just make sure to keep your markdown unindented, since whitespace matters. + +## underscore + +[Underscore](http://underscorejs.org/) provides a collection of useful functions +[to manipulate arrays, objects, and functions. `underscore` is included in every +[Meteor app because the framework itself uses it extensively. + +## spiderable + +This package gives your app server-side rendering to allow search engine +crawlers and other bots see your app's contents. If you care about SEO, you +should add this package. + +{{/template}} \ No newline at end of file diff --git a/docs/client/basic/toc.html b/docs/client/basic/toc.html index 09ae22d304..06114cb528 100644 --- a/docs/client/basic/toc.html +++ b/docs/client/basic/toc.html @@ -9,8 +9,6 @@

Building Mobile Apps

- - {{#each sections}}

{{title}}

diff --git a/docs/client/basic/toc.js b/docs/client/basic/toc.js index 52f8b6d00f..93663dc238 100644 --- a/docs/client/basic/toc.js +++ b/docs/client/basic/toc.js @@ -101,15 +101,17 @@ var sections = [ id: "packages", subtitle: "Add extra functionality to your app with 'meteor add'", items: [ - item("Searching on Atmosphere", {id: "using-atmosphere"}), - item("accounts-ui"), + item("Searching for packages", {id: "searchingforpackages"}), + item("accounts-ui", {id: "accountsui"}), item("coffeescript"), + item("email"), item("jade"), item("jquery"), item("http"), item("less"), item("markdown"), - item("underscore") + item("underscore"), + item("spiderable") ] }) ];