0.2.4 • Published 7 years ago

build-screens v0.2.4

Weekly downloads
4
License
MIT
Repository
github
Last release
7 years ago

build-screens

vnjson screen builder

buildscreens ./srcDir ./distDir true

input

index.html

<hello-world>
    <h1>Hello world!</h1>
</hello-world>
<script>
vnjs.on('hello-world', function(){

  this.parse({
                audio: 'mainTheme',
                scene: 'background1'
          });
});

</script>
<style>
h1{
  color:red;
}  

</style>

output

index.html

<section id="vnjson__hello-world" class="vnjson__screen">
  <h1>Hello world!</h1>
</section>

style.css

bundle.js

Program

let watch = true;
function notify(err, data){
  if(err){
    throw new Error(err);
  }
  console.log(data);
}
buildscreend('./src', './dest', notify, watch);