增加晶全app静态页面

This commit is contained in:
微微一笑
2025-07-05 14:49:26 +08:00
parent 194035cf79
commit aede64dacd
2323 changed files with 524101 additions and 0 deletions

View File

@ -0,0 +1,26 @@
// Adapted from:
// https://github.com/AllJoyn-Cordova/cordova-plugin-alljoyn/blob/master/scripts/beforePluginInstall.js
const path = require('path');
const exec = require('child_process').exec;
const packageName = require('../package.json').name;
module.exports = function () {
return new Promise(function (resolve, reject) {
console.log('installing external dependencies via npm');
console.log('for package name: ' + packageName);
exec('npm install', { cwd: path.join('plugins', packageName) },
function (error, stdout, stderr) {
if (error !== null) {
console.log('npm install of external dependencies failed with error message: ' + error.message);
reject();
} else {
console.log('npm install of external dependencies ok');
resolve();
}
}
);
});
};

View File

@ -0,0 +1,40 @@
const path = require('path');
const fs = require('fs-extra');
const spawn = require('cross-spawn');
console.info('Removing any old artifacts from spec');
fs.removeSync('spec/myplugin');
fs.removeSync('spec/plugins');
fs.removeSync('spec/platforms');
const myplugin = path.join('spec', 'myplugin');
console.info('Copying plugin artifacts into ' + myplugin);
fs.ensureDirSync(myplugin);
['package.json', 'plugin.xml'].forEach((src) => {
const dest = path.join(myplugin, src);
fs.copySync(src, dest);
});
['scripts', 'src', 'www'].forEach((src) => {
const dest = path.join(myplugin, src);
fs.ensureDirSync(dest);
fs.copySync(src, dest);
});
const args = 'plugin add myplugin';
console.log('Spawning Cordova CLI in `spec` with the following arguments: ' + args);
spawn.sync('cordova', args.split(' '), {
cwd: 'spec',
stdio: 'inherit',
});
console.info('The spec is now ready to test a copy of this plugin.');
console.info('Please do `cd spec` and then use `cordova platform add` to add each desired platform.');