Skip to content

Commit 3f80179

Browse files
committedOct 19, 2015
Created basic microscope project.
chapter2-1
0 parents  commit 3f80179

14 files changed

+197
-0
lines changed
 

‎.meteor/.finished-upgraders

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# This file contains information which helps Meteor properly upgrade your
2+
# app when you run 'meteor update'. You should check it into version control
3+
# with your project.
4+
5+
notices-for-0.9.0
6+
notices-for-0.9.1
7+
0.9.4-platform-file
8+
notices-for-facebook-graph-api-2
9+
1.2.0-standard-minifiers-package
10+
1.2.0-meteor-platform-split
11+
1.2.0-cordova-changes
12+
1.2.0-breaking-changes

‎.meteor/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
local

‎.meteor/.id

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# This file contains a token that is unique to your project.
2+
# Check it into your repository along with the rest of this directory.
3+
# It can be used for purposes such as:
4+
# - ensuring you don't accidentally deploy one app on top of another
5+
# - providing package authors with aggregated statistics
6+
7+
adtvcqcdlr761u2znzz

‎.meteor/cordova-plugins

Whitespace-only changes.

‎.meteor/packages

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Meteor packages used by this project, one per line.
2+
# Check this file (and the other files in this directory) into your repository.
3+
#
4+
# 'meteor add' and 'meteor remove' will edit this file for you,
5+
# but you can also edit it by hand.
6+
7+
meteor-base # Packages every Meteor app needs to have
8+
mobile-experience # Packages for a great mobile UX
9+
mongo # The database Meteor supports right now
10+
blaze-html-templates # Compile .html files into Meteor Blaze views
11+
session # Client-side reactive dictionary for your app
12+
jquery # Helpful client-side library
13+
tracker # Meteor's client-side reactive programming library
14+
15+
standard-minifiers # JS/CSS minifiers run for production mode
16+
es5-shim # ECMAScript 5 compatibility for older browsers.
17+
ecmascript # Enable ECMAScript2015+ syntax in app code
18+
19+
autopublish # Publish all data to the clients (for prototyping)
20+
insecure # Allow all DB writes from clients (for prototyping)

‎.meteor/platforms

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
server
2+
browser

‎.meteor/release

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
METEOR@1.2.0.2

‎.meteor/versions

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
autopublish@1.0.4
2+
autoupdate@1.2.3
3+
babel-compiler@5.8.24_1
4+
babel-runtime@0.1.4
5+
base64@1.0.4
6+
binary-heap@1.0.4
7+
blaze@2.1.3
8+
blaze-html-templates@1.0.1
9+
blaze-tools@1.0.4
10+
boilerplate-generator@1.0.4
11+
caching-compiler@1.0.0
12+
caching-html-compiler@1.0.2
13+
callback-hook@1.0.4
14+
check@1.0.6
15+
ddp@1.2.2
16+
ddp-client@1.2.1
17+
ddp-common@1.2.1
18+
ddp-server@1.2.1
19+
deps@1.0.9
20+
diff-sequence@1.0.1
21+
ecmascript@0.1.5
22+
ecmascript-collections@0.1.6
23+
ejson@1.0.7
24+
es5-shim@4.1.13
25+
fastclick@1.0.7
26+
geojson-utils@1.0.4
27+
hot-code-push@1.0.0
28+
html-tools@1.0.5
29+
htmljs@1.0.5
30+
http@1.1.1
31+
id-map@1.0.4
32+
insecure@1.0.4
33+
jquery@1.11.4
34+
launch-screen@1.0.4
35+
livedata@1.0.15
36+
logging@1.0.8
37+
meteor@1.1.9
38+
meteor-base@1.0.1
39+
minifiers@1.1.7
40+
minimongo@1.0.10
41+
mobile-experience@1.0.1
42+
mobile-status-bar@1.0.6
43+
mongo@1.1.2
44+
mongo-id@1.0.1
45+
npm-mongo@1.4.39_1
46+
observe-sequence@1.0.7
47+
ordered-dict@1.0.4
48+
promise@0.5.0
49+
random@1.0.4
50+
reactive-dict@1.1.2
51+
reactive-var@1.0.6
52+
reload@1.1.4
53+
retry@1.0.4
54+
routepolicy@1.0.6
55+
session@1.1.1
56+
spacebars@1.0.7
57+
spacebars-compiler@1.0.7
58+
standard-minifiers@1.0.1
59+
templating@1.1.4
60+
templating-tools@1.0.0
61+
tracker@1.0.9
62+
ui@1.0.8
63+
underscore@1.0.4
64+
url@1.0.5
65+
webapp@1.2.2
66+
webapp-hashing@1.0.5

‎LICENSE.txt

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Copyright (C) 2012--2014 Discover Meteor
2+
3+
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:
4+
5+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6+
7+
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.

‎README.markdown

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Microscope
2+
3+
Microscope is a simple social news app that lets you share links, comment, and vote on them.
4+
5+
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.
6+
7+
Microscope itself is free and open-source, and is a good example of common Meteor app patterns such as:
8+
9+
- Routing
10+
- User Accounts
11+
- Notifications
12+
- Errors
13+
- Publications/Subscriptions
14+
- Permissions
15+
16+
## This Repository
17+
18+
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`.
19+
20+
Also, note that as the book focuses on _development_, all CSS is committed in a single commit early on.
21+
22+
### Branches
23+
24+
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.
25+
26+
### Developing on Nitrous.IO
27+
28+
Start hacking on this app on
29+
[Nitrous.IO](https://www.nitrous.io/?utm_source=github.com&utm_campaign=Microscope&utm_medium=hackonnitrous)
30+
in seconds:
31+
32+
[![Hack DiscoverMeteor/Microscope on
33+
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)
34+

‎README.nitrous.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Setup for Nitrous.IO
2+
3+
Before you can run this project, you will need to install Meteor with Autoparts, and install Meteorite with NPM.
4+
5+
Run the following commands in the Terminal below:
6+
7+
1. `cd ~/workspace/Microscope/`
8+
2. `parts install meteor`
9+
3. `npm install -g meteorite`
10+
4. `mrt update`
11+
5. `meteor`
12+
13+
Go to the "Preview Menu" and click "Port 3000"
14+

‎microscope.css

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/* CSS declarations go here */

‎microscope.html

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<head>
2+
<title>microscope</title>
3+
</head>
4+
5+
<body>
6+
{{> hello}}
7+
</body>
8+
9+
<template name="hello">
10+
<h1>Hello World!</h1>
11+
{{greeting}}
12+
<input type="button" value="Click" />
13+
</template>

‎microscope.js

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
if (Meteor.isClient) {
2+
Template.hello.greeting = function () {
3+
return "Welcome to microscope.";
4+
};
5+
6+
Template.hello.events({
7+
'click input' : function () {
8+
// template data, if any, is available in 'this'
9+
if (typeof console !== 'undefined')
10+
console.log("You pressed the button");
11+
}
12+
});
13+
}
14+
15+
if (Meteor.isServer) {
16+
Meteor.startup(function () {
17+
// code to run on server at startup
18+
});
19+
}

0 commit comments

Comments
 (0)