Git Product home page Git Product logo

hackathon-2016's Introduction

hackathon-2016

This is the demonstration we could show at the Geneva Hackathon 2016. You can see the result here.

Example from the story point of view

Follows an example of story and how it is implemented with action files.

May 1, 2016 - 15:30
Kilian Jornet is running in the mountain.
But suddenly, he falls and sprains his right ankle.
He returns in his car with a limp.
He launches the APP.

// File: "s1-start.js"
['story', [
  // `reset` means that you want fresh data in the APP.
  ['reset', {
    'info.firstname': 'Kilian',
    'info.lastname': 'JORNET',
    // Let's define an empty list of appointments.
    appointments: [],
    // Data starting with a `$` are demo specific.
    // `$today` is used to set to current datetime of the current action.
    // Internally, dates have this format: YYYYMMDDhhmm
    $today: 201605011530,
    // `$next` is the action to take when the APP is closed.
    $next: "s1-back-to-home"
  }],
  // `text` is free HTML.
  // Double curlies are used to insert data.
  // `|datetime` format a date in a human readable way.
  ['text', '<b>{{today|datetime}}</b>'],
  ['text', '{{info.firstname}} {{info.lastname}} is running in the mountain.'],
  ['text', 'But suddenly, he falls and sprains his right ankle.'],
  ['text', 'He returns in his car with a limp.'],
  ['button', { text: 'He launches the APP', action: 'app' }],
]]

We don't describe here the app.js file which is about the APP. Just focus on the story point of view.

May 1, 2016 - 17:45
Kilian call his doctor and get an appointment for tomorrow 9:00 AM. He registers this appointment in his APP.

['story', [
  // Using `set` instead of `reset` will add new data, but doesn't reset the existing data.
  ['set', {
    $today: 201605011745,
    $next: "s1-next"
  }],
  ['text', '<b>{{today|datetime}}</b>'],
  ['text', '{{info.firstname}}  call his doctor and get an appointment for tomorrow 9:00 AM.'],
  ['button', { text: "He registers this appointment in his APP.", action: 'app' }]
]]

That's all that need to be known for story makers.

Prerequisites

First of all you need to install this:

  • A repository manager: git
  • A off-browser javascript runner: nodejs (the LTS version)
  • A Apache/PHP solution: wamp (for Windows users)

Setting up your environment

You need to use the command line. On Linux it is obvious, in Windows, you can use the Git Bash that comes with git. Then open a terminal, go to your working forlder and type this:

git clone https://github.com/tolokoban/hackathon-2016.git hackathon-2016
cd hackathon-2016
npm update

Now, you are in the new directory that has been created:

You will find the file package.json in this folder. Edit it and change the following line:

    "output": "../../www/hackathon"

Replace ../../www/hackathon with the path of the root of your Apache/PHP server. If you use wamp, dig into its installation folder and look for a file called index.html. This is the directory of index.html that you should use as output value.

Compile the project

To start the continue compilation process, just open a terminal, go in the hackathon-2016 directory and type:

npm run debug

Now you start working on the sources and view the result in a browser at this URL: [http://localhost/]

hackathon-2016's People

Contributors

tolokoban avatar mdusan avatar

Watchers

James Cloos avatar Dimitrios Proios avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.