Permalink
Browse files

Created basic microscope project.

chapter2-1
  • Loading branch information...
tmeasday committed Apr 7, 2013
0 parents commit 3f8017941e318d3db7f80103208ed55f4a6e0f25
@@ -0,0 +1,12 @@
+# This file contains information which helps Meteor properly upgrade your
+# app when you run 'meteor update'. You should check it into version control
+# with your project.
+
+notices-for-0.9.0
+notices-for-0.9.1
+0.9.4-platform-file
+notices-for-facebook-graph-api-2
+1.2.0-standard-minifiers-package
+1.2.0-meteor-platform-split
+1.2.0-cordova-changes
+1.2.0-breaking-changes
@@ -0,0 +1 @@
+local
@@ -0,0 +1,7 @@
+# This file contains a token that is unique to your project.
+# Check it into your repository along with the rest of this directory.
+# It can be used for purposes such as:
+# - ensuring you don't accidentally deploy one app on top of another
+# - providing package authors with aggregated statistics
+
+adtvcqcdlr761u2znzz
No changes.
@@ -0,0 +1,20 @@
+# Meteor packages used by this project, one per line.
+# Check this file (and the other files in this directory) into your repository.
+#
+# 'meteor add' and 'meteor remove' will edit this file for you,
+# but you can also edit it by hand.
+
+meteor-base # Packages every Meteor app needs to have
+mobile-experience # Packages for a great mobile UX
+mongo # The database Meteor supports right now
+blaze-html-templates # Compile .html files into Meteor Blaze views
+session # Client-side reactive dictionary for your app
+jquery # Helpful client-side library
+tracker # Meteor's client-side reactive programming library
+
+standard-minifiers # JS/CSS minifiers run for production mode
+es5-shim # ECMAScript 5 compatibility for older browsers.
+ecmascript # Enable ECMAScript2015+ syntax in app code
+
+autopublish # Publish all data to the clients (for prototyping)
+insecure # Allow all DB writes from clients (for prototyping)
@@ -0,0 +1,2 @@
+server
+browser
@@ -0,0 +1 @@
+METEOR@1.2.0.2
@@ -0,0 +1,66 @@
+autopublish@1.0.4
+autoupdate@1.2.3
+babel-compiler@5.8.24_1
+babel-runtime@0.1.4
+base64@1.0.4
+binary-heap@1.0.4
+blaze@2.1.3
+blaze-html-templates@1.0.1
+blaze-tools@1.0.4
+boilerplate-generator@1.0.4
+caching-compiler@1.0.0
+caching-html-compiler@1.0.2
+callback-hook@1.0.4
+check@1.0.6
+ddp@1.2.2
+ddp-client@1.2.1
+ddp-common@1.2.1
+ddp-server@1.2.1
+deps@1.0.9
+diff-sequence@1.0.1
+ecmascript@0.1.5
+ecmascript-collections@0.1.6
+ejson@1.0.7
+es5-shim@4.1.13
+fastclick@1.0.7
+geojson-utils@1.0.4
+hot-code-push@1.0.0
+html-tools@1.0.5
+htmljs@1.0.5
+http@1.1.1
+id-map@1.0.4
+insecure@1.0.4
+jquery@1.11.4
+launch-screen@1.0.4
+livedata@1.0.15
+logging@1.0.8
+meteor@1.1.9
+meteor-base@1.0.1
+minifiers@1.1.7
+minimongo@1.0.10
+mobile-experience@1.0.1
+mobile-status-bar@1.0.6
+mongo@1.1.2
+mongo-id@1.0.1
+npm-mongo@1.4.39_1
+observe-sequence@1.0.7
+ordered-dict@1.0.4
+promise@0.5.0
+random@1.0.4
+reactive-dict@1.1.2
+reactive-var@1.0.6
+reload@1.1.4
+retry@1.0.4
+routepolicy@1.0.6
+session@1.1.1
+spacebars@1.0.7
+spacebars-compiler@1.0.7
+standard-minifiers@1.0.1
+templating@1.1.4
+templating-tools@1.0.0
+tracker@1.0.9
+ui@1.0.8
+underscore@1.0.4
+url@1.0.5
+webapp@1.2.2
+webapp-hashing@1.0.5
@@ -0,0 +1,7 @@
+Copyright (C) 2012--2014 Discover Meteor
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,34 @@
+# Microscope
+
+Microscope is a simple social news app that lets you share links, comment, and vote on them.
+
+It was built with [Meteor](http://meteor.com) as a companion app to [The Meteor Book](http://themeteorbook.com), and is the "little brother" of [Telescope](http://telesc.pe), the (much more complex) open-source social news app that was the inspiration for the book.
+
+Microscope itself is free and open-source, and is a good example of common Meteor app patterns such as:
+
+- Routing
+- User Accounts
+- Notifications
+- Errors
+- Publications/Subscriptions
+- Permissions
+
+## This Repository
+
+The commits to this repository are organized in a very linear fashion, corresponding to progress throughout the book. Commits are tagged in the format `chapterX-Y`, indicating the `Y`th commit of chapter `X`.
+
+Also, note that as the book focuses on _development_, all CSS is committed in a single commit early on.
+
+### Branches
+
+There are 2 branches in this repository which correspond to advanced code that is covered in sidebars of the book, and outside of the main code progression. They are tagged `sidebarX-Y`, corresponding to the sidebar number in the book.
+
+### Developing on Nitrous.IO
+
+Start hacking on this app on
+[Nitrous.IO](https://www.nitrous.io/?utm_source=github.com&utm_campaign=Microscope&utm_medium=hackonnitrous)
+in seconds:
+
+[![Hack DiscoverMeteor/Microscope on
+Nitrous.IO](https://d3o0mnbgv6k92a.cloudfront.net/assets/hack-l-v1-3cc067e71372f6045e1949af9d96095b.png)](https://www.nitrous.io/hack_button?source=embed&runtime=nodejs&repo=DiscoverMeteor%2FMicroscope&file_to_open=README.nitrous.md)
+
@@ -0,0 +1,14 @@
+# Setup for Nitrous.IO
+
+Before you can run this project, you will need to install Meteor with Autoparts, and install Meteorite with NPM.
+
+Run the following commands in the Terminal below:
+
+1. `cd ~/workspace/Microscope/`
+2. `parts install meteor`
+3. `npm install -g meteorite`
+4. `mrt update`
+5. `meteor`
+
+Go to the "Preview Menu" and click "Port 3000"
+
@@ -0,0 +1 @@
+/* CSS declarations go here */
@@ -0,0 +1,13 @@
+<head>
+ <title>microscope</title>
+</head>
+
+<body>
+ {{> hello}}
+</body>
+
+<template name="hello">
+ <h1>Hello World!</h1>
+ {{greeting}}
+ <input type="button" value="Click" />
+</template>
@@ -0,0 +1,19 @@
+if (Meteor.isClient) {
+ Template.hello.greeting = function () {
+ return "Welcome to microscope.";
+ };
+
+ Template.hello.events({
+ 'click input' : function () {
+ // template data, if any, is available in 'this'
+ if (typeof console !== 'undefined')
+ console.log("You pressed the button");
+ }
+ });
+}
+
+if (Meteor.isServer) {
+ Meteor.startup(function () {
+ // code to run on server at startup
+ });
+}

1 comment on commit 3f80179

@xiaonian0430

This comment has been minimized.

Show comment
Hide comment

可以的

Please sign in to comment.