diff --git a/build.js b/build.js index 948eb99..7bd47ed 100644 --- a/build.js +++ b/build.js @@ -45,7 +45,7 @@ if (kind === 'w') { await esbuild.build(opts) } else { - console.error('ERROR: OPT w|b|d not selected') + console.error('ERROR: OPT w|b not selected') } cliRun(`ls -lh ${opts.outdir}`) diff --git a/demo/fez/clock.fez b/demo/fez/clock.fez index 90e3d46..2044eec 100644 --- a/demo/fez/clock.fez +++ b/demo/fez/clock.fez @@ -1,15 +1,16 @@ - ')) { - pushTo = 'html' - } else if (l) { - out[pushTo].push(l) - } - } - - return out -} - -const out = parseTpl(tpl) -for (let k of Object.keys(out)) { - out[k] = out[k].join("\n").trim() - // console.log(out[k]) -} - -function generateFez(name, data) { - return ` -Fez('ui-todo', class extends FezBase { - static html = \`${data.html}\` - - static css = \`${data.style}\` - - ${data.script} -} -` -} -import tpl1 from './tpl.html' - -console.log(tpl1) +// const fs = require('fs') + +// var tpl = fs.readFileSync('test/tpl.html', 'utf8') + +// function parseTpl(text) { +// let pushTo = 'html' + +// const out = { +// script: [], +// style: [], +// html: [] +// } + +// for (const l of text.split("\n")) { +// if (l.startsWith('')) { +// pushTo = 'html' +// } else if (l.startsWith('')) { +// pushTo = 'html' +// } else if (l) { +// out[pushTo].push(l) +// } +// } + +// return out +// } + +// const out = parseTpl(tpl) +// for (let k of Object.keys(out)) { +// out[k] = out[k].join("\n").trim() +// // console.log(out[k]) +// } + +// function generateFez(name, data) { +// return ` +// Fez('ui-todo', class extends FezBase { +// static html = \`${data.html}\` + +// static css = \`${data.style}\` + +// ${data.script} +// } +// ` +// } +// import tpl1 from './tpl.html' + +// console.log(tpl1) // console.log(generateFez('ui-foo', out)) + +import content from '../demo/fez/clock.fez'; + +console.log(content);