增加晶全app静态页面
This commit is contained in:
26
node_modules/cordova-sqlite-storage/scripts/beforePluginInstall.js
generated
vendored
Normal file
26
node_modules/cordova-sqlite-storage/scripts/beforePluginInstall.js
generated
vendored
Normal 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();
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
};
|
40
node_modules/cordova-sqlite-storage/scripts/prepareSpec.js
generated
vendored
Normal file
40
node_modules/cordova-sqlite-storage/scripts/prepareSpec.js
generated
vendored
Normal 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.');
|
Reference in New Issue
Block a user