mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(angular): ionic/core is only a dep
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
"tsc": "tsc -p .",
|
||||
"validate": "npm i && npm run lint && npm run test && npm run build"
|
||||
},
|
||||
"main": "dist/index.js",
|
||||
"module": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"files": [
|
||||
"dist/",
|
||||
|
||||
25
angular/scripts/build-core.js
vendored
25
angular/scripts/build-core.js
vendored
@@ -4,30 +4,6 @@ const spawn = require('child_process').spawn;
|
||||
|
||||
const stencilPath = path.join(__dirname, '..', '..', 'core', 'node_modules', '.bin');
|
||||
|
||||
|
||||
function buildIonicAngular() {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
||||
const cmd = 'stencil';
|
||||
const args = [
|
||||
'build',
|
||||
'--config',
|
||||
path.join(__dirname, '..', 'stencil.config.js'),
|
||||
...process.argv.slice(2)
|
||||
];
|
||||
|
||||
const p = spawn('./stencil', args, { cwd: stencilPath, stdio: 'inherit' });
|
||||
p.on('close', (code) => {
|
||||
if (code > 0) {
|
||||
console.log(`@ionic/angular build exited with ${code}`);
|
||||
reject();
|
||||
} else {
|
||||
resolve();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function copyIonicons() {
|
||||
const src = path.join(__dirname, '..', '..', 'core', 'node_modules', 'ionicons');
|
||||
const dst = path.join(__dirname, '..', 'node_modules', 'ionicons');
|
||||
@@ -46,4 +22,3 @@ function copyCSS() {
|
||||
|
||||
copyIonicons();
|
||||
copyCSS();
|
||||
buildIonicAngular();
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
const path = require('path');
|
||||
|
||||
// use ionic/core's stencil config
|
||||
exports.config = require('../core/stencil.config.js').config;
|
||||
|
||||
// user ionic core's tsconfig
|
||||
exports.config.tsconfig ='../core/tsconfig.json';
|
||||
|
||||
// update where to find the original ionic/core src
|
||||
exports.config.srcDir = '../core/src';
|
||||
exports.config.globalScript = '../core/src/global/ionic-global.ts';
|
||||
|
||||
// update the output targets
|
||||
exports.config.outputTargets = [
|
||||
{
|
||||
type: 'angular',
|
||||
componentCorePackage: '@ionic/core',
|
||||
directivesProxyFile: 'src/directives/proxies.ts',
|
||||
directivesArrayFile: 'src/directives/proxies-list.txt',
|
||||
empty: false,
|
||||
excludeComponents: [
|
||||
// overlays
|
||||
'ion-action-sheet',
|
||||
'ion-action-sheet-controller',
|
||||
'ion-alert',
|
||||
'ion-alert-controller',
|
||||
'ion-loading',
|
||||
'ion-loading-controller',
|
||||
'ion-modal',
|
||||
'ion-modal-controller',
|
||||
'ion-picker',
|
||||
'ion-picker-controller',
|
||||
'ion-popover',
|
||||
'ion-popover-controller',
|
||||
'ion-toast',
|
||||
'ion-toast-controller',
|
||||
'ion-toast',
|
||||
|
||||
// controllers
|
||||
'ion-menu-controller',
|
||||
'ion-animation-controller',
|
||||
|
||||
// navigation
|
||||
'ion-router',
|
||||
'ion-route',
|
||||
'ion-route-redirect',
|
||||
'ion-router-outlet',
|
||||
'ion-anchor',
|
||||
'ion-tabbar',
|
||||
|
||||
// auxiliar
|
||||
'ion-picker-column',
|
||||
'ion-anchor',
|
||||
'ion-virtual-scroll'
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
exports.devServer = {
|
||||
root: '.',
|
||||
watchGlob: ['dist/*.*', 'dist/ionic/**/**', 'src/**/*.html']
|
||||
};
|
||||
Reference in New Issue
Block a user