From 4802fbd477d9076cdd5b5ae018c5a4c84d2db204 Mon Sep 17 00:00:00 2001 From: Josh Thomas Date: Fri, 30 Jun 2017 13:38:37 -0500 Subject: [PATCH] fix(): update for e2e to use ionic core components. --- packages/ionic-angular/package.json | 3 ++- packages/ionic-angular/scripts/gulp/tasks/e2e.dev.ts | 5 ++++- packages/ionic-angular/stencil.config.js | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/ionic-angular/package.json b/packages/ionic-angular/package.json index be9fc8b2cf..14114f939f 100644 --- a/packages/ionic-angular/package.json +++ b/packages/ionic-angular/package.json @@ -23,7 +23,8 @@ "test": "gulp validate", "test:generators": "jasmine-node ./tooling/spec", "link": "gulp release.prepareReleasePackage && cd dist/ionic-angular && npm link", - "link.stencil": "npm link @stencil/core" + "link.stencil": "npm link @stencil/core", + "build.stencil": "stencil build" }, "dependencies": { "@angular/common": "4.1.3", diff --git a/packages/ionic-angular/scripts/gulp/tasks/e2e.dev.ts b/packages/ionic-angular/scripts/gulp/tasks/e2e.dev.ts index 7b710b8106..671cb9c02e 100644 --- a/packages/ionic-angular/scripts/gulp/tasks/e2e.dev.ts +++ b/packages/ionic-angular/scripts/gulp/tasks/e2e.dev.ts @@ -1,5 +1,6 @@ import { dirname, join } from 'path'; import { readFileSync } from 'fs'; +import { spawnSync } from 'child_process'; import { task } from 'gulp'; @@ -24,13 +25,15 @@ function serveTest(folderInfo: any) { const testOrDemoName = join(folderInfo.componentName, folderInfo.componentTest); const ionicAngularDir = join(PROJECT_ROOT, 'src'); const coreCompilerFilePath = join(PROJECT_ROOT, '..', 'ionic-core', 'dist', 'compiler'); - const coreDir = join(PROJECT_ROOT, '..', 'ionic-core', 'dist', 'compiled-ionic-angular'); + const coreDir = join(PROJECT_ROOT, 'dist', 'core'); const srcTestRoot = join(PROJECT_ROOT, 'src', 'components', folderInfo.componentName, 'test', folderInfo.componentTest); const distTestRoot = join(PROJECT_ROOT, 'dist', 'e2e', 'components', folderInfo.componentName, 'test', folderInfo.componentTest); const includeGlob = [ join(ionicAngularDir, '**', '*.ts')]; const pathToWriteFile = join(distTestRoot, 'tsconfig.json'); const pathToReadFile = join(PROJECT_ROOT, 'tsconfig.json'); + spawnSync('npm', ['run', 'build.stencil']); + createTempTsConfig(includeGlob, ES_2015, ES_2015, pathToReadFile, pathToWriteFile, { removeComments: true}); const sassConfigPath = join('scripts', 'e2e', 'sass.config.js'); diff --git a/packages/ionic-angular/stencil.config.js b/packages/ionic-angular/stencil.config.js index fee71b6968..84932c9b17 100644 --- a/packages/ionic-angular/stencil.config.js +++ b/packages/ionic-angular/stencil.config.js @@ -1,5 +1,5 @@ exports.config = { - dest: 'dist', + dest: 'dist/core', collections: [ '@ionic/core' ]