Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
785890d
Add TouchstoneJS starter
zenlambda Jun 27, 2015
11ad8a4
Add gitignore form touchstone starter
zenlambda Jun 27, 2015
53f90e6
Remove build arifacts from version control
zenlambda Jun 27, 2015
e57bf76
Ignore build outputs
zenlambda Jun 27, 2015
a40fb96
Ripple touchstonejs/touchstone-starter#18
zenlambda Jun 27, 2015
591a429
Create a 'start' view
zenlambda Jun 27, 2015
4eca143
Hard wrap 'start' view jsx
zenlambda Jun 27, 2015
b77fd5a
Slider working, icons positioned
zenlambda Jun 28, 2015
28fda31
Cleanup range code
zenlambda Jun 28, 2015
7fa7798
Componentising panels with backgrounds
zenlambda Jun 28, 2015
3ce85a0
Swapped out inline background panel component for reusable one
zenlambda Jun 28, 2015
b133b38
Rapidly transcribed speaker data, mistakes likely
zenlambda Jun 28, 2015
3973ee4
Add presentation times
zenlambda Jun 28, 2015
1fd745d
Add explanation for background component
zenlambda Jun 28, 2015
bf6cb41
Setup the programme view
zenlambda Jun 28, 2015
7fb0815
Programme view mostly working correctly
zenlambda Jun 28, 2015
255bd89
Use react europe pic when speaker avatar cannot be found
zenlambda Jun 28, 2015
3c24dfb
Fix time strings, item keys
zenlambda Jun 28, 2015
13eacaf
More tweaks to presentation of speaker names
zenlambda Jun 28, 2015
ecc13eb
Talk time padding
zenlambda Jun 28, 2015
42ecdf2
Line length
zenlambda Jun 28, 2015
b71c4e6
Tweak presentation of times and speaker names
zenlambda Jun 28, 2015
f88eaeb
Add linter
zenlambda Jun 28, 2015
32ee1e6
Lint data file
zenlambda Jun 28, 2015
2e8efc3
Lint program view
zenlambda Jun 28, 2015
e4d1f6a
First cut at FlipMedia, totally messed up!
zenlambda Jun 28, 2015
ad4c5a9
Lint Range component
zenlambda Jun 28, 2015
5f79523
Flipper... closer...
zenlambda Jun 28, 2015
8fe6b64
Flipper getting closer...
zenlambda Jun 28, 2015
17089cc
Pretty much working, but is it really what we want?
zenlambda Jun 28, 2015
0c02db4
Use setInterval like a pro :P
zenlambda Jun 29, 2015
b9222ee
Center range icons and correct flippers in safari
zenlambda Jun 29, 2015
10411f7
Getting there...
zenlambda Jun 29, 2015
702263a
Fix missing transitionend
zenlambda Jun 29, 2015
f09668a
Better flip entering
zenlambda Jun 29, 2015
a84c205
More css changes for csstransgrp flipper
zenlambda Jun 29, 2015
2d581bc
FlipMedia2
zenlambda Jun 29, 2015
c263c9f
Trying to revert to original stylesheet for FlipMedia2
zenlambda Jun 29, 2015
3c3ab74
Bugfix for FlipMedia2
zenlambda Jun 29, 2015
031aac1
Put GraphQL back in the right place
zenlambda Jun 29, 2015
8e6b9d1
Add talk descriptions
zenlambda Jun 29, 2015
0699a90
Simplify transitions
zenlambda Jun 29, 2015
36734ad
Remove flip hover
zenlambda Jun 29, 2015
44bd7bc
Linting
zenlambda Jun 29, 2015
cdb9892
Remove unneeded back button
zenlambda Jun 29, 2015
f02f624
Linting
zenlambda Jun 29, 2015
acd3bb5
j'adoube
zenlambda Jun 29, 2015
a3221ec
Event details...
zenlambda Jun 30, 2015
d5bee18
Add hashtag data
zenlambda Jun 30, 2015
a5eda38
Speaker detail view
zenlambda Jun 30, 2015
4bea774
Cut out various screens that we don't have time to build
zenlambda Jun 30, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
29 changes: 29 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"parser": "espree",

"env": {
"browser": true,
},

"rules": {
"quotes" : 0,
"strict": [2, "never"],
"comma-dangle": [2, "always-multiline"],
"new-cap": [2, {
"capIsNewExceptions": ["Timers"]
}],
},

"ecmaFeatures": {
"jsx": true
},

"plugins": [
"react"
],

"globals": {
"module" : false,
"require" : false,
}
}
49 changes: 49 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Logs
logs
*.log

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# Common
.DS_Store
build

# Node.js
node_modules

# Xcode
*.mode1v3
*.mode2v3
*.perspectivev3
*.pbxuser
*.hmap
*.ipa
*.xcuserstate
*.xccheckout
*.moved-aside
*.perspectivev3
xcuserdata
DerivedData

# Android
build.xml
local.properties
gradlew
gradlew.bat
gradle
ant-build
ant-gen
gen
out

# Remove build output
www
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: node server.js
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,11 @@ Once the theme is posted, you will need to:
- you will still be able to update your pull request until July 1st 4pm UTC just like people attending the hackathon at Mozilla office.
**REQUIRED: In your pull request title, make to specify "challenge RedBadger" or "challenge Thinkmill" at the start of your PR's title. What could help: screenshots and a screencast in your PR, they can be posted as commets after the deadline**.
- The two winners will get 5 minutes each to present their app at the start of the lightning session on the 2nd of July at 6pm.

# Ideas:

* Twitter streams that mention conference speakers and topics close to speakers.

* Foursquare mashup with useful locations near to conference.


16 changes: 16 additions & 0 deletions config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.thinkmill.touchstonejs-starter" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>Touchstone</name>
<description>
Touchstone Starter App
</description>
<author email="hello@thinkmill.com.au" href="http://www.thinkmill.com.au">
Thinkmill Team
</author>
<content src="index.html" />
<access origin="*" />
<preference name="DisallowOverscroll" value="true"/>
<feature name="StatusBar">
<param name="ios-package" value="CDVStatusBar" onload="true" />
</feature>
</widget>
6 changes: 6 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/**
* Gulp tasks are added by the touchstonejs-tasks package
* See https://github.com/JedWatson/touchstonejs-tasks
*/

require('touchstonejs-tasks')(require('gulp'));
196 changes: 196 additions & 0 deletions hooks/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,196 @@
<!--
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
-->
# Cordova Hooks

Cordova Hooks represent special scripts which could be added by application and plugin developers or even by your own build system to customize cordova commands. Hook scripts could be defined by adding them to the special predefined folder (`/hooks`) or via configuration files (`config.xml` and `plugin.xml`) and run serially in the following order:
* Application hooks from `/hooks`;
* Application hooks from `config.xml`;
* Plugin hooks from `plugins/.../plugin.xml`.

__Remember__: Make your scripts executable.

__Note__: `.cordova/hooks` directory is also supported for backward compatibility, but we don't recommend using it as it is deprecated.

## Supported hook types
The following hook types are supported:

after_build/
after_compile/
after_docs/
after_emulate/
after_platform_add/
after_platform_rm/
after_platform_ls/
after_plugin_add/
after_plugin_ls/
after_plugin_rm/
after_plugin_search/
after_plugin_install/ <-- Plugin hooks defined in plugin.xml are executed exclusively for a plugin being installed
after_prepare/
after_run/
after_serve/
before_build/
before_compile/
before_docs/
before_emulate/
before_platform_add/
before_platform_rm/
before_platform_ls/
before_plugin_add/
before_plugin_ls/
before_plugin_rm/
before_plugin_search/
before_plugin_install/ <-- Plugin hooks defined in plugin.xml are executed exclusively for a plugin being installed
before_plugin_uninstall/ <-- Plugin hooks defined in plugin.xml are executed exclusively for a plugin being uninstalled
before_prepare/
before_run/
before_serve/
pre_package/ <-- Windows 8 and Windows Phone only.

## Ways to define hooks
### Via '/hooks' directory
To execute custom action when corresponding hook type is fired, use hook type as a name for a subfolder inside 'hooks' directory and place you script file here, for example:

# script file will be automatically executed after each build
hooks/after_build/after_build_custom_action.js


### Config.xml

Hooks can be defined in project's `config.xml` using `<hook>` elements, for example:

<hook type="before_build" src="scripts/appBeforeBuild.bat" />
<hook type="before_build" src="scripts/appBeforeBuild.js" />
<hook type="before_plugin_install" src="scripts/appBeforePluginInstall.js" />

<platform name="wp8">
<hook type="before_build" src="scripts/wp8/appWP8BeforeBuild.bat" />
<hook type="before_build" src="scripts/wp8/appWP8BeforeBuild.js" />
<hook type="before_plugin_install" src="scripts/wp8/appWP8BeforePluginInstall.js" />
...
</platform>

<platform name="windows8">
<hook type="before_build" src="scripts/windows8/appWin8BeforeBuild.bat" />
<hook type="before_build" src="scripts/windows8/appWin8BeforeBuild.js" />
<hook type="before_plugin_install" src="scripts/windows8/appWin8BeforePluginInstall.js" />
...
</platform>

### Plugin hooks (plugin.xml)

As a plugin developer you can define hook scripts using `<hook>` elements in a `plugin.xml` like that:

<hook type="before_plugin_install" src="scripts/beforeInstall.js" />
<hook type="after_build" src="scripts/afterBuild.js" />

<platform name="wp8">
<hook type="before_plugin_install" src="scripts/wp8BeforeInstall.js" />
<hook type="before_build" src="scripts/wp8BeforeBuild.js" />
...
</platform>

`before_plugin_install`, `after_plugin_install`, `before_plugin_uninstall` plugin hooks will be fired exclusively for the plugin being installed/uninstalled.

## Script Interface

### Javascript

If you are writing hooks in Javascript you should use the following module definition:
```javascript
module.exports = function(context) {
...
}
```

You can make your scipts async using Q:
```javascript
module.exports = function(context) {
var Q = context.requireCordovaModule('q');
var deferral = new Q.defer();

setTimeout(function(){
console.log('hook.js>> end');
deferral.resolve();
}, 1000);

return deferral.promise;
}
```

`context` object contains hook type, executed script full path, hook options, command-line arguments passed to Cordova and top-level "cordova" object:
```json
{
"hook": "before_plugin_install",
"scriptLocation": "c:\\script\\full\\path\\appBeforePluginInstall.js",
"cmdLine": "The\\exact\\command\\cordova\\run\\with arguments",
"opts": {
"projectRoot":"C:\\path\\to\\the\\project",
"cordova": {
"platforms": ["wp8"],
"plugins": ["com.plugin.withhooks"],
"version": "0.21.7-dev"
},
"plugin": {
"id": "com.plugin.withhooks",
"pluginInfo": {
...
},
"platform": "wp8",
"dir": "C:\\path\\to\\the\\project\\plugins\\com.plugin.withhooks"
}
},
"cordova": {...}
}

```
`context.opts.plugin` object will only be passed to plugin hooks scripts.

You can also require additional Cordova modules in your script using `context.requireCordovaModule` in the following way:
```javascript
var Q = context.requireCordovaModule('q');
```

__Note__: new module loader script interface is used for the `.js` files defined via `config.xml` or `plugin.xml` only.
For compatibility reasons hook files specified via `/hooks` folders are run via Node child_process spawn, see 'Non-javascript' section below.

### Non-javascript

Non-javascript scripts are run via Node child_process spawn from the project's root directory and have the root directory passes as the first argument. All other options are passed to the script using environment variables:

* CORDOVA_VERSION - The version of the Cordova-CLI.
* CORDOVA_PLATFORMS - Comma separated list of platforms that the command applies to (e.g.: android, ios).
* CORDOVA_PLUGINS - Comma separated list of plugin IDs that the command applies to (e.g.: org.apache.cordova.file, org.apache.cordova.file-transfer)
* CORDOVA_HOOK - Path to the hook that is being executed.
* CORDOVA_CMDLINE - The exact command-line arguments passed to cordova (e.g.: cordova run ios --emulate)

If a script returns a non-zero exit code, then the parent cordova command will be aborted.

## Writing hooks

We highly recommend writting your hooks using Node.js so that they are
cross-platform. Some good examples are shown here:

[http://devgirl.org/2013/11/12/three-hooks-your-cordovaphonegap-project-needs/](http://devgirl.org/2013/11/12/three-hooks-your-cordovaphonegap-project-needs/)

Also, note that even if you are working on Windows, and in case your hook scripts aren't bat files (which is recommended, if you want your scripts to work in non-Windows operating systems) Cordova CLI will expect a shebang line as the first line for it to know the interpreter it needs to use to launch the script. The shebang line should match the following example:

#!/usr/bin/env [name_of_interpreter_executable]
43 changes: 43 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"name": "touchstonejs-starter",
"version": "0.0.2",
"description": "Touchstone Starter",
"private": true,
"main": "src/js/app.js",
"author": "Jed Watson",
"dependencies": {
"async": "^1.0.0",
"classnames": "^2.0.0",
"moment": "^2.10.3",
"react": "^0.13.0",
"react-tappable": "^0.2.5",
"react-timers": "^2.0.0",
"superagent": "^0.21.0",
"touchstonejs": "^0.3.0",
"underscore": "^1.7.0"
},
"devDependencies": {
"eslint": "^0.24.0",
"eslint-plugin-react": "^2.6.1",
"gulp": "^3.8.10",
"happiness": "*",
"touchstonejs-tasks": "^0.2.0"
},
"scripts": {
"build": "gulp clean && gulp build",
"watch": "gulp clean && gulp watch",
"start": "gulp clean && gulp dev",
"prepare": "gulp clean && gulp prepare",
"build:production": "gulp clean && NODE_ENV=production gulp build",
"prepare:production": "gulp clean && NODE_ENV=production gulp prepare",
"test": "happiness"
},
"happiness": {
"ignore": [
"platforms",
"plugins",
"src/data",
"www"
]
}
}
5 changes: 5 additions & 0 deletions platforms/ios/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*.mode1v3
*.perspectivev3
*.pbxuser
.DS_Store
build/
Loading