Skip to content

bare-bones virtual-dom starter using main-loop and browserify/watchify with npm run scripts

Notifications You must be signed in to change notification settings

yoshuawuyts/vel-starter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vel-starter

bare-bones vel starter and browserify/watchify with npm run scripts

view the starter demo

quick start

$ npm run watch &
$ npm start

commands

  • npm run build - build js for production
  • npm run watch - automatically build js on file changes for development
  • npm start - start a development server

starter code

const vel = require('vel')

const el = vel(function (h, state) {
  return h('div', [
    h('h1', 'clicked ' + state.n + ' times'),
    h('button', { onclick: onclick }, 'click me!')
  ])

  function onclick () {
    el({ n: state.n + 1 })
  }
})

document.querySelector('#content').appendChild(el({ n: 0 }))

contributing

If you like what you see, but want to add something more, fork this repo and add your additional feature to the name of the fork. Try to be specific with the name of your fork, listing the technologies used plus what features the fork adds.

variations

Check out the list of forks to see how other people have customized this starter repo.

About

bare-bones virtual-dom starter using main-loop and browserify/watchify with npm run scripts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 72.5%
  • HTML 27.5%