How to use the licia.stripCmt 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.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github liriliri / licia / lib / pack.js View on Github external
dependencies
            );
            if (tsDefinition) {
                await fs.writeFile(
                    path.resolve(
                        './.licia/packages/' + pkgName,
                        modName + '.d.ts'
                    ),
                    tsDefinition,
                    'utf-8'
                );
            }
        }

        if (pkgName !== 'licia-src') {
            data = stripCmt(data);
        }

        let outputPath = path.resolve(
            './.licia/packages/' + pkgName,
            modName + '.js'
        );
        if (pkgName === 'miniprogram-licia') {
            outputPath = path.resolve(
                `./.licia/packages/${pkgName}/miniprogram_dist`,
                modName + '.js'
            );
        }

        await fs.writeFile(outputPath, data, 'utf-8');
    }
}