How to use the licia.keys function in licia

To help you get started, we’ve selected a few licia examples, based on popular ways it is used in public projects.

github liriliri / licia / lib / es5.js View on Github external
(async function() {
    await mkdir(path.resolve(`.licia/packages/licia-uglify`));
    const _keys = keys(modData);

    for (let i = 0, len = _keys.length; i < len; i++) {
        const key = _keys[i];
        const data = modData[key];
        if (!contain(data.env, 'browser') && !contain(data.env, 'miniprogram'))
        const srcPath = path.resolve(`.licia/packages/licia/${key}.js`);
        const output = uglifyJs.minify(await fs.readFile(srcPath, 'utf8'));
        if (output.error) {
            console.log(`Something wrong with ${key}: ${output.error}`);
        const outputPath = path.resolve(
        await fs.writeFile(outputPath, output.code, 'utf8');
github liriliri / licia / lib / update.js View on Github external
async function updateDoc() {
    await eustiaBuild({
        include: keys(output),
        enableLog: true,
        library: '$_abcdefghijklmnopqrstuvwxyz'
            .map(val => 'src/' + val),
        output: '.licia/testUtil/doc.js',
        ts: true
    await eustiaDoc({
        input: '.licia/testUtil/doc.js',
        format: 'md',
        title: 'Licia Documentation',
        output: OUTPUT_DOC_PATH
    let doc = await fs.readFile(OUTPUT_DOC_PATH, 'utf8');
    doc = doc.replace(regTsIgnore, '');
    await fs.writeFile(OUTPUT_DOC_PATH, doc, 'utf8');