Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API sketch #3

Open
sethvincent opened this issue Jul 8, 2016 · 0 comments
Open

API sketch #3

sethvincent opened this issue Jul 8, 2016 · 0 comments

Comments

@sethvincent
Copy link
Collaborator

sethvincent commented Jul 8, 2016

Here's a rough early idea of what making a workshop with adventuretron might look like:

main.js, the main electron process:

var adventuretron = require('adventuretron/main')

var workshop = adventuretron({
  title: 'Example Workshop'
})

workshop.on('ready', function ready () {
  console.log('electron app is ready')
  // your app code here
})

app.js, the renderer process:

var createApp = require('adventuretron')
var app = createApp({
  challenges: [
    require('./challenges/introduction')
  ]
})

var tree = app.start({ href: false })
document.body.appendChild(tree)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant