mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-15 09:34:19 +08:00

* init ivy support * chore(): angular prerelease * chore: update * updates * angular 8 deps * chore(angular): update sync script * updates * chore(): remove console log * chore(): updates * chore(): update release script * fix(): remove comments * fix(): remove test version * fix(): failing angular test * fix(): failing angular tests * fix(): update ci steps * fix(): fix sync script * chore(): refactor angular proxies * chore(): updates * chore(): updates * chore(): lint * chore(): updates * chore(ssr): check for window * chore(): fix virtual scroll angular tests * chore(): lint * chore(): add server to link * chore(scripts): update release script * chore(): bump version check * style(scripts): spacing
64 lines
1.9 KiB
JavaScript
64 lines
1.9 KiB
JavaScript
const fs = require('fs-extra');
|
|
const path = require('path');
|
|
const spawn = require('child_process').spawn;
|
|
|
|
const stencilPath = path.join(__dirname, '..', '..', 'core', 'node_modules', '.bin');
|
|
const typescriptPath = path.join(__dirname, '..', 'node_modules', '.bin');
|
|
|
|
function copyIonicons() {
|
|
const src = path.join(__dirname, '..', '..', 'core', 'node_modules', 'ionicons');
|
|
const dst = path.join(__dirname, '..', 'node_modules', 'ionicons');
|
|
|
|
fs.removeSync(dst);
|
|
fs.copySync(src, dst);
|
|
}
|
|
|
|
function copyCSS() {
|
|
const src = path.join(__dirname, '..', '..', 'core', 'css');
|
|
const dst = path.join(__dirname, '..','dist', 'css');
|
|
|
|
fs.removeSync(dst);
|
|
fs.copySync(src, dst);
|
|
}
|
|
|
|
function buildSchematics(){
|
|
return new Promise((resolve, reject) => {
|
|
const cmd = 'tsc';
|
|
const args = [
|
|
'--project',
|
|
path.join(__dirname, '..', 'tsconfig.schematics.json'),
|
|
];
|
|
|
|
const p = spawn(cmd, args, { cwd: typescriptPath, stdio: 'inherit', shell: true });
|
|
p.on('close', (code) => {
|
|
if (code > 0) {
|
|
console.log(`ng-add build exited with ${code}`);
|
|
reject();
|
|
} else {
|
|
resolve();
|
|
}
|
|
});
|
|
});
|
|
}
|
|
|
|
function copySchematicsJson(){
|
|
const src = path.join(__dirname, '..', 'src', 'schematics', 'collection.json');
|
|
const fileSrc = path.join(__dirname, '..', 'src', 'schematics', 'add', 'files');
|
|
const dst = path.join(__dirname, '..', 'dist','schematics', 'collection.json');
|
|
const fileDst = path.join(__dirname, '..', 'dist', 'schematics', 'add', 'files');
|
|
const schemaSrc = path.join(__dirname, '..', 'src', 'schematics', 'add', 'schema.json');
|
|
const schemaDst = path.join(__dirname, '..', 'dist', 'schematics', 'add', 'schema.json');
|
|
|
|
fs.removeSync(dst);
|
|
fs.removeSync(fileDst);
|
|
fs.copySync(src, dst);
|
|
fs.copySync(fileSrc,fileDst);
|
|
fs.copySync(schemaSrc, schemaDst);
|
|
|
|
}
|
|
|
|
copyIonicons();
|
|
copyCSS();
|
|
buildSchematics();
|
|
copySchematicsJson()
|