Skip to content

Commit

Permalink
fix(angular): ionic/core is only a dep
Browse files Browse the repository at this point in the history
  • Loading branch information
manucorporat committed Sep 25, 2018
1 parent a74fd6f commit 236d8a4
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 90 deletions.
2 changes: 1 addition & 1 deletion angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/",
Expand Down
25 changes: 0 additions & 25 deletions angular/scripts/build-core.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -46,4 +22,3 @@ function copyCSS() {

copyIonicons();
copyCSS();
buildIonicAngular();
62 changes: 0 additions & 62 deletions angular/stencil.config.js

This file was deleted.

46 changes: 44 additions & 2 deletions core/stencil.config.js → core/stencil.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const { sass } = require('@stencil/sass');
import { Config } from '@stencil/core';
import { sass } from '@stencil/sass';

exports.config = {
export const config: Config = {
namespace: 'Ionic',
bundles: [
{ components: ['ion-action-sheet', 'ion-action-sheet-controller'] },
Expand Down Expand Up @@ -58,6 +59,47 @@ exports.config = {
{
type: 'stats',
file: 'stats.json'
},
{
type: 'angular',
componentCorePackage: '@ionic/core',
directivesProxyFile: '../angular/src/directives/proxies.ts',
directivesArrayFile: '../angular/src/directives/proxies-list.txt',
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'
]
}
],
testing: {
Expand Down

0 comments on commit 236d8a4

Please sign in to comment.