Skip to content
Snippets Groups Projects
  • rhenck's avatar
    fa7e2b04
    Add new element math-editor · fa7e2b04
    rhenck authored
    Uses external software 'MathLive'.
    
    Distpacker issues with mathlive have been solved in a custom 
    distpacker.ts in scripts-folder. This is now used instead of the 
    distpacker from the npm package.
    fa7e2b04
    History
    Add new element math-editor
    rhenck authored
    Uses external software 'MathLive'.
    
    Distpacker issues with mathlive have been solved in a custom 
    distpacker.ts in scripts-folder. This is now used instead of the 
    distpacker from the npm package.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
wrap_and_pack.js 772 B
#!/usr/bin/env node

// eslint-disable-next-line @typescript-eslint/no-var-requires
const fs = require('fs');
// eslint-disable-next-line @typescript-eslint/no-var-requires
const execSync = require('child_process').execSync;

const packageName = process.argv[2];
const packageVersion = process.argv[3];
const wrapperPath = process.argv[4];

execSync(`node node_modules/iqb-dev-components/src/js_css_packer.js dist ${packageName} dist`);
const fileContent = fs.readFileSync(wrapperPath, 'utf8').toString()
  .replace(/version-placeholder/g, packageVersion);
fs.writeFileSync('dist/index.html', fileContent, 'utf8');

const targetFileName = `verona-${packageName}-aspect-${packageVersion}.html`;
execSync(`node scripts/distpacker.js dist ${targetFileName} ${packageName}`);