View decorated-component.js
import {component} from 'react'
@component
export default class MyComponent {
componentDidMount() {
}
render() {
}
}
View Section.js
'use strict'
import React from 'react'
import useSheet from 'react-jss'
import sectionStyle from './sectionStyle'
import Item from './Item'
/**
* One list section which has a title and list items.
*/
View fastClickSurfacePatch.js
define(function(require, exports, module) {
var Surface = require('famous/core/Surface')
// https://github.com/Famous/core/issues/37
Surface.prototype.emit = function(type, event) {
if (event && !event.origin) event.origin = this;
return this.eventHandler.emit(type, event);
}
})
View BaseTransition.js
define(function(require, exports, module) {
'use strict'
var CachedMap = require('famous/transitions/CachedMap')
var Transform = require('famous/core/Transform')
var _ = require('underscore')
function BaseTransition(options) {
var o = this.options = _.extend({}, this.constructor.DEFAULT_OPTIONS, options)
var spec = this.spec = {}
View app.js
exports.ready = new Promise(function(fulfill, reject) {
var isResized, isDomReady
var isDeviceReady = !window.cordova
context.on('resize', function() {
isResized = true
resolve()
})
domready(function() {
View SomeView.js
SomeView.prototype.show = function() {
var prevAnimation = {
transition: {},
transform: {}
}
var thisAnimation = {
transition: {},
transform: {}
}
View structure.md

app

  1. lib (app unspecific, installed from bower, npm or component)
  • lib1
  1. src (app specific)
  • screens (take components and build screens)
    • screen1
      • models
        • Model1.js
      • views
        • View1.js
View famous-scrollview.js
/* globals define */
define(function(require, exports, module) {
'use strict';
// import dependencies
var Engine = require('famous/core/Engine');
var Modifier = require('famous/core/Modifier');
var Transform = require('famous/core/Transform');
var Scrollview = require("famous/views/Scrollview");
var View = require('famous/core/View');
var Surface = require('famous/core/Surface');
View dpi.css
/******************************************************************************
* Screens DPI
* @see
* http://developer.android.com/guide/webapps/overview.html
* http://developer.android.com/guide/practices/screens_support.html
*****************************************************************************/
/*mdpi*/
@media (-webkit-min-device-pixel-ratio : 1) and (min-width: 320px), (min-device-pixel-ratio : 1) and (min-width: 320px) {
body {zoom: 0.5 !important;}
View mongoose-test.js
var m = require('mongoose'),
fs = require('fs'),
http = require('http');
m.connect('mongodb://localhost/test');
var ObjectId = m.Types.ObjectId;
var UserModel = m.model('user', require('./userSchema', {strict: false}));
var data = { "birthday" : Date("1981-09-21T00:00:00Z"), "email" : "aaaaa@bbbbbb.com", "firstName" : "Hannes", "lastIpAddr" : "138.188.103.139", "lastName" : "Gassert", "likedSkim" : true, "locale" : "en_US", "nick" : "Hannes", "relationshipStatus" : "In a Relationship", "urlName" : "han", "coins" : 550, "marketValue" : 63, "currentLocale" : "en-us", "sports" : [ ], "schools" : [ { "id" : "109924452370813", "name" : "Gymnasium Leonhard", "_id" : ObjectId("517fc1e66d19040200004fb7") }, { "id" : "107967209224731", "name" : "University of Fribourg", "_id" : ObjectId("517fc1e66d19040200004fb6") }, { "id" : "109414082410185", "name" : "National University of Ireland, Galway", "_id" : ObjectId("517fc1e66d19040200004fb5") } ], "jobs" : [ { "id" : "1602115006654