build: build cordova.js during npm prepare (#1271)

This commit is contained in:
Raphael von der Grün
2021-07-14 10:25:34 +02:00
committed by GitHub
parent b94409ffe0
commit 35f0d07521
8 changed files with 92 additions and 4114 deletions

View File

@@ -56,10 +56,6 @@ function copyJsAndLibrary (projectPath, shared, projectName, targetAPI) {
fs.ensureDirSync(platform_www);
fs.copySync(srcCordovaJsPath, path.join(platform_www, 'cordova.js'));
// Copy cordova-js-src directory into platform_www directory.
// We need these files to build cordova.js if using browserify method.
fs.copySync(path.join(ROOT, 'cordova-js-src'), path.join(platform_www, 'cordova-js-src'));
if (shared) {
var relativeFrameworkPath = path.relative(projectPath, getFrameworkDir(projectPath, true));
fs.symlinkSync(relativeFrameworkPath, nestedCordovaLibPath, 'dir');