Skip to content
Permalink
Browse files
build: build cordova.js during npm prepare (#1271)
  • Loading branch information
raphinesse committed Jul 14, 2021
1 parent b94409f commit 35f0d075219087685e159f0daaeacd512119cb25
Show file tree
Hide file tree
Showing 8 changed files with 92 additions and 4,114 deletions.
@@ -25,6 +25,9 @@ example
/framework/libs
/framework/javadoc-public
/framework/javadoc-private

**/assets/www/cordova.js

/test/.externalNativeBuild

/test/androidx/gradle
@@ -3,3 +3,4 @@ coverage
test
spec
framework/build
cordova-js-src
@@ -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');

Some generated files are not rendered by default. Learn more.

@@ -11,6 +11,7 @@
"apache"
],
"scripts": {
"prepare": "cordova-js build > templates/project/assets/www/cordova.js",
"test": "npm run lint && npm run cover && npm run java-unit-tests",
"lint": "eslint lib spec test \"templates/cordova/**/!(*.*)\"",
"unit-tests": "jasmine --config=spec/unit/jasmine.json",
@@ -36,6 +37,7 @@
},
"devDependencies": {
"@cordova/eslint-config": "^3.0.0",
"cordova-js": "^6.1.0",
"jasmine": "^3.7.0",
"jasmine-spec-reporter": "^7.0.0",
"nyc": "^15.1.0",

0 comments on commit 35f0d07

Please sign in to comment.