ddd
This commit is contained in:
parent
0a343ecbc5
commit
c3a6f5ff37
80 changed files with 2512 additions and 1625 deletions
|
|
@ -4,7 +4,8 @@ const path=require('path');
|
|||
const vm=require('vm');
|
||||
const root=path.resolve(__dirname,'../..');
|
||||
const read=name=>fs.readFileSync(path.join(root,name),'utf8');
|
||||
const app=read('app.js'),html=read('index.html'),css=read('style.css'),worker=read('puzzle-worker.js'),appLogicSource=read('app-logic.js');
|
||||
const app=read('app.js'),html=read('index.html'),css=`${read('style.css')}\n${read('client/styles/tokens.css')}\n${read('client/styles/base.css')}\n${read('client/ui/cursor.css')}\n${read('client/styles/accessibility.css')}`,worker=read('puzzle-worker.js'),appLogicSource=read('app-logic.js'),buildMetaSource=read('build-meta.js');
|
||||
const buildMeta=require(path.join(root,'build-meta.js'));
|
||||
function assert(value,message){if(!value)throw new Error(message)}
|
||||
function functionSource(name,source=app){
|
||||
let start=source.indexOf(`async function ${name}(`);if(start<0)start=source.indexOf(`function* ${name}(`);if(start<0)start=source.indexOf(`function ${name}(`);
|
||||
|
|
@ -43,4 +44,4 @@ function starterPuzzle(){
|
|||
assert(match,'Bundled origin puzzle missing');
|
||||
return JSON.parse(match[1]);
|
||||
}
|
||||
module.exports={root,read,app,html,css,worker,appLogicSource,assert,functionSource,createContext,runFunctions,loadBendPuzzle,loadAppLogic,starterPuzzle,vm,path,fs};
|
||||
module.exports={root,read,app,html,css,worker,appLogicSource,buildMetaSource,buildMeta,assert,functionSource,createContext,runFunctions,loadBendPuzzle,loadAppLogic,starterPuzzle,vm,path,fs};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue