mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 04:14:21 +08:00
chore(scripts): update e2e prod build to work with ionic-app-scripts (#10083)
* chore(e2e): WIP to add files needed for app-scripts * chore(e2e): WIP one e2e test building but with errors * chore(e2e): move e2e.prod to working with app-scripts move shared functions into util, add support for debug flag when running e2e.prod / demos.prod which gets passed to app-scripts * chore(build): fix app-scripts build for all e2e and demos * chore(e2e): update ionic-angular import path * chore(build): update dev paths to work with prod * chore(e2e): get watch working with e2e prod * docs(scripts): update README for running e2e and demos closes #8411 closes #10023
This commit is contained in:
@ -39,7 +39,7 @@
|
||||
"zone.js": "~0.6.26"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@ionic/app-scripts": "0.0.48-201612291559",
|
||||
"@ionic/app-scripts": "1.0.0",
|
||||
"@ionic/commit-hooks": "1.0.3",
|
||||
"@types/connect": "3.4.30",
|
||||
"@types/del": "2.2.31",
|
||||
|
@ -35,10 +35,15 @@ Run `gulp build` or `gulp watch` to watch for changes.
|
||||
|
||||
The following commands take longer to run because they use AoT compilation. They should really only be used to validate that our components work with AoT, and fix them if not.
|
||||
|
||||
1. Run `gulp e2e.prod` to bundle all e2e tests, or pass a folder for a specific test. For example, `gulp e2e.prod --f=alert/basic` will build the test in `src/components/alert/test/basic`.
|
||||
2. Run `gulp e2e.watchProd` with a folder passed to watch a test. For example, `gulp e2e.watchProd --f=select/single-value` will watch the test in `src/components/select/test/single-value`.
|
||||
1. Run `gulp e2e.prod` to bundle all e2e tests. Folder is optional, see the flags section below.
|
||||
2. Run `gulp e2e.watchProd` with a folder passed to watch a test. Folder is required, see the flags section below.
|
||||
3. Navigate to `http://localhost:8000/dist/e2e`
|
||||
|
||||
##### Flags
|
||||
|
||||
- `--f | -folder` will run the command with a test folder. For example, `gulp e2e.watchProd --f=select/single-value` will watch the test in `src/components/select/test/single-value`.
|
||||
- `--debug` will run the `ionic-app-scripts` command with debug output printed.
|
||||
|
||||
|
||||
### Building & Running API Demos
|
||||
|
||||
@ -51,10 +56,15 @@ The following commands take longer to run because they use AoT compilation. They
|
||||
|
||||
The following commands take longer to run because they use AoT compilation. They should really only be used to validate that our components work with AoT, and fix them if not.
|
||||
|
||||
1. Run `gulp demos.prod` to bundle all demos tests, or pass a folder for a specific test. For example, `gulp demos.prod --f=alert` will build the test in `demos/alert/`.
|
||||
2. Run `gulp demos.watchProd` with a folder passed to watch a test. For example, `gulp demos.watchProd --f=select` will watch the test in `demos/select/`.
|
||||
1. Run `gulp demos.prod` to bundle all demos tests. Folder is optional, see the flags section below.
|
||||
2. Run `gulp demos.watchProd` with a folder passed to watch a test. Folder is required, see the flags section below.
|
||||
3. Navigate to `http://localhost:8000/dist/demos`
|
||||
|
||||
##### Flags
|
||||
|
||||
- `--f | -folder` will run the command with a test folder. For example, `gulp demos.watchProd --f=alert` will build the test in `demos/alert/`.
|
||||
- `--debug` will run the `ionic-app-scripts` command with debug output printed.
|
||||
|
||||
|
||||
### Building API Docs
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
'@angular/http': '/node_modules/@angular/http/bundles/http.umd.js',
|
||||
'@angular/platform-browser': '/node_modules/@angular/platform-browser/bundles/platform-browser.umd.js',
|
||||
'@angular/platform-browser-dynamic': '/node_modules/@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
|
||||
'ionic-angular': location.protocol + '//' + location.host,
|
||||
'ionic-angular': location.protocol + '//' + location.host + '/dist/ionic-angular',
|
||||
'rxjs': '/node_modules/rxjs'
|
||||
},
|
||||
packages: {
|
||||
|
7
scripts/e2e/copy.config.js
Normal file
7
scripts/e2e/copy.config.js
Normal file
@ -0,0 +1,7 @@
|
||||
// we don't want to run copy for the demos, so just override the config for now
|
||||
module.exports = {
|
||||
copyAssets: { },
|
||||
copyIndexContent: { },
|
||||
copyFonts: { },
|
||||
copyPolyfills: { }
|
||||
}
|
@ -48,7 +48,7 @@
|
||||
'@angular/http': '/node_modules/@angular/http/bundles/http.umd.js',
|
||||
'@angular/platform-browser': '/node_modules/@angular/platform-browser/bundles/platform-browser.umd.js',
|
||||
'@angular/platform-browser-dynamic': '/node_modules/@angular/platform-browser-dynamic/bundles/platform-browser-dynamic.umd.js',
|
||||
'ionic-angular': location.protocol + '//' + location.host,
|
||||
'ionic-angular': location.protocol + '//' + location.host + '/ionic-angular',
|
||||
'rxjs': '/node_modules/rxjs'
|
||||
},
|
||||
packages: {
|
||||
|
@ -6,7 +6,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
||||
|
||||
<link id="ionicLink" href="../../../../css/ionic.css" rel="stylesheet">
|
||||
<link id="ionicLink" href="./build/main.css" rel="stylesheet">
|
||||
<link href="../../../../css/e2e.shared.css" rel="stylesheet">
|
||||
|
||||
<script>
|
||||
@ -43,7 +43,7 @@
|
||||
document.body.classList.remove('rtl');
|
||||
}
|
||||
</script>
|
||||
<script src="../../../../polyfills/polyfills.ng.js"></script>
|
||||
<script src="./app.bundle.js"></script>
|
||||
<script src="../../../../polyfills/polyfills.js"></script>
|
||||
<script src="./build/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -1,4 +0,0 @@
|
||||
import { platformBrowser } from '@angular/platform-browser';
|
||||
import { AppModuleNgFactory } from './app.module.ngfactory';
|
||||
|
||||
platformBrowser().bootstrapModuleFactory(AppModuleNgFactory);
|
5
scripts/e2e/main.ts
Normal file
5
scripts/e2e/main.ts
Normal file
@ -0,0 +1,5 @@
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app.module';
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
103
scripts/e2e/sass.config.js
Normal file
103
scripts/e2e/sass.config.js
Normal file
@ -0,0 +1,103 @@
|
||||
|
||||
// https://www.npmjs.com/package/node-sass
|
||||
|
||||
module.exports = {
|
||||
|
||||
/**
|
||||
* outputFilename: The filename of the saved CSS file
|
||||
* from the sass build. The directory which it is saved in
|
||||
* is set within the "buildDir" config options.
|
||||
*/
|
||||
outputFilename: process.env.IONIC_OUTPUT_CSS_FILE_NAME,
|
||||
|
||||
/**
|
||||
* sourceMap: If source map should be built or not.
|
||||
*/
|
||||
sourceMap: false,
|
||||
|
||||
/**
|
||||
* outputStyle: How node-sass should output the css file.
|
||||
*/
|
||||
outputStyle: 'expanded',
|
||||
|
||||
/**
|
||||
* autoprefixer: The config options for autoprefixer.
|
||||
* Excluding this config will skip applying autoprefixer.
|
||||
* https://www.npmjs.com/package/autoprefixer
|
||||
*/
|
||||
autoprefixer: {
|
||||
browsers: [
|
||||
'last 2 versions',
|
||||
'iOS >= 8',
|
||||
'Android >= 4.4',
|
||||
'Explorer >= 11',
|
||||
'ExplorerMobile >= 11'
|
||||
],
|
||||
cascade: false
|
||||
},
|
||||
|
||||
/**
|
||||
* includePaths: Used by node-sass for additional
|
||||
* paths to search for sass imports by just name.
|
||||
*/
|
||||
includePaths: [
|
||||
'src/themes',
|
||||
'node_modules/ionicons/dist/scss',
|
||||
'src/fonts'
|
||||
],
|
||||
|
||||
/**
|
||||
* includeFiles: An array of regex patterns to search for
|
||||
* sass files in the same directory as the component module.
|
||||
* If a file matches both include and exclude patterns, then
|
||||
* the file will be excluded.
|
||||
*/
|
||||
includeFiles: [
|
||||
/\.(s(c|a)ss)$/i
|
||||
],
|
||||
|
||||
/**
|
||||
* excludeFiles: An array of regex patterns for files which
|
||||
* should be excluded. If a file matches both include and exclude
|
||||
* patterns, then the file will be excluded.
|
||||
*/
|
||||
excludeFiles: [
|
||||
/* /\.(wp).(scss)$/i */
|
||||
],
|
||||
|
||||
/**
|
||||
* variableSassFiles: Lists out the files which include
|
||||
* only sass variables. These variables are the first sass files
|
||||
* to be imported so their values override default variables.
|
||||
*/
|
||||
variableSassFiles: [
|
||||
'./scripts/e2e/variables.scss'
|
||||
],
|
||||
|
||||
/**
|
||||
* directoryMaps: Compiled JS modules may be within a different
|
||||
* directory than its source file and sibling component sass files.
|
||||
* For example, NGC places it's files within the .tmp directory
|
||||
* but doesn't copy over its sass files. This is useful so sass
|
||||
* also checks the JavaScript's source directory for sass files.
|
||||
*/
|
||||
directoryMaps: {
|
||||
'{{TMP}}': '{{SRC}}'
|
||||
},
|
||||
|
||||
/**
|
||||
* excludeModules: Used just as a way to skip over
|
||||
* modules which we know wouldn't have any sass to be
|
||||
* bundled. "excludeModules" isn't necessary, but is a
|
||||
* good way to speed up build times by skipping modules.
|
||||
*/
|
||||
excludeModules: [
|
||||
'@angular',
|
||||
'commonjs-proxy',
|
||||
'core-js',
|
||||
'ionic-native',
|
||||
'rxjs',
|
||||
'zone.js'
|
||||
]
|
||||
|
||||
};
|
79
scripts/e2e/variables.scss
Normal file
79
scripts/e2e/variables.scss
Normal file
@ -0,0 +1,79 @@
|
||||
// Ionic Variables and Theming. For more info, please see:
|
||||
// http://ionicframework.com/docs/v2/theming/
|
||||
|
||||
// Font path is used to include ionicons,
|
||||
// roboto, and noto sans fonts
|
||||
$font-path: "../../../../../fonts";
|
||||
|
||||
@import "ionic.globals";
|
||||
|
||||
|
||||
// Shared Variables
|
||||
// --------------------------------------------------
|
||||
// To customize the look and feel of this app, you can override
|
||||
// the Sass variables found in Ionic's source scss files.
|
||||
// To view all the possible Ionic variables, see:
|
||||
// http://ionicframework.com/docs/v2/theming/overriding-ionic-variables/
|
||||
|
||||
|
||||
// Named Color Variables
|
||||
// --------------------------------------------------
|
||||
// Named colors makes it easy to reuse colors on various components.
|
||||
// It's highly recommended to change the default colors
|
||||
// to match your app's branding. Ionic uses a Sass map of
|
||||
// colors so you can add, rename and remove colors as needed.
|
||||
// The "primary" color is the only required color in the map.
|
||||
|
||||
$colors: (
|
||||
primary: #387ef5,
|
||||
secondary: #32db64,
|
||||
danger: #f53d3d,
|
||||
light: #f4f4f4,
|
||||
dark: #222,
|
||||
vibrant: rebeccapurple,
|
||||
bright: #ffc125
|
||||
);
|
||||
|
||||
|
||||
// App iOS Variables
|
||||
// --------------------------------------------------
|
||||
// iOS only Sass variables can go here
|
||||
|
||||
|
||||
|
||||
// App Material Design Variables
|
||||
// --------------------------------------------------
|
||||
// Material Design only Sass variables can go here
|
||||
|
||||
|
||||
// App Windows Variables
|
||||
// --------------------------------------------------
|
||||
// Windows only Sass variables can go here
|
||||
|
||||
|
||||
|
||||
// App Theme
|
||||
// --------------------------------------------------
|
||||
// Ionic apps can have different themes applied, which can
|
||||
// then be future customized. This import comes last
|
||||
// so that the above variables are used and Ionic's
|
||||
// default are overridden.
|
||||
|
||||
@import "ionic.theme.default";
|
||||
|
||||
|
||||
// Ionicons
|
||||
// --------------------------------------------------
|
||||
// The premium icon font for Ionic. For more info, please see:
|
||||
// http://ionicframework.com/docs/v2/ionicons/
|
||||
|
||||
@import "ionicons";
|
||||
|
||||
|
||||
// Fonts
|
||||
// --------------------------------------------------
|
||||
// Roboto font is used by default for Material Design. Noto sans
|
||||
// is used by default for Windows.
|
||||
|
||||
@import "roboto";
|
||||
@import "noto-sans";
|
@ -1,5 +1,4 @@
|
||||
import { spawnSync } from 'child_process';
|
||||
import { accessSync, F_OK, readdirSync, readFileSync, stat, statSync } from 'fs';
|
||||
import { accessSync, F_OK, readFileSync, stat } from 'fs';
|
||||
import { dirname, join } from 'path';
|
||||
|
||||
import { dest, src, start, task } from 'gulp';
|
||||
@ -10,7 +9,7 @@ import { obj } from 'through2';
|
||||
import * as VinylFile from 'vinyl';
|
||||
|
||||
import { DEMOS_SRC_ROOT, DIST_DEMOS_ROOT, DIST_NAME, DEMOS_NAME, ES5, ES_2015, LOCAL_SERVER_PORT, SCRIPTS_ROOT } from '../constants';
|
||||
import { createTempTsConfig, getFolderInfo } from '../util';
|
||||
import { createTempTsConfig, getFolderInfo, getFolders, runAppScripts } from '../util';
|
||||
|
||||
task('demos.prod', demosBuild);
|
||||
|
||||
@ -68,18 +67,24 @@ task('demos.compileTests', (done: Function) => {
|
||||
let folderInfo = getFolderInfo();
|
||||
|
||||
if (folderInfo.componentName && folderInfo.componentTest) {
|
||||
buildTest(folderInfo.componentName);
|
||||
buildTest(folderInfo);
|
||||
} else {
|
||||
buildAllTests(done);
|
||||
}
|
||||
});
|
||||
|
||||
function buildTest(folderName: string) {
|
||||
let includeGlob = [`./dist/demos/${folderName}/*.ts`];
|
||||
let pathToWriteFile = `${DIST_DEMOS_ROOT}/${folderName}/tsconfig.json`;
|
||||
function buildTest(folderInfo: any) {
|
||||
let includeGlob = [`./dist/demos/${folderInfo.componentName}/*.ts`];
|
||||
let pathToWriteFile = `${DIST_DEMOS_ROOT}/${folderInfo.componentName}/tsconfig.json`;
|
||||
|
||||
createTempTsConfig(includeGlob, ES5, ES_2015, `${DEMOS_SRC_ROOT}/tsconfig.json`, pathToWriteFile);
|
||||
return runAppScripts(folderName);
|
||||
|
||||
let sassConfigPath = 'scripts/demos/sass.config.js';
|
||||
|
||||
let appEntryPoint = `dist/demos/${folderInfo.componentName}/main.ts`;
|
||||
let distDir = `dist/demos/${folderInfo.componentName}/`;
|
||||
|
||||
return runAppScripts(folderInfo, sassConfigPath, appEntryPoint, distDir);
|
||||
}
|
||||
|
||||
function buildAllTests(done: Function) {
|
||||
@ -89,7 +94,11 @@ function buildAllTests(done: Function) {
|
||||
folders.forEach(folder => {
|
||||
stat(`./dist/demos/${folder}/app.module.ts`, function(err, stat) {
|
||||
if (err == null) {
|
||||
const promise = buildTest(folder);
|
||||
let folderInfo = {
|
||||
componentName: folder,
|
||||
componentTest: 'basic'
|
||||
};
|
||||
const promise = buildTest(folderInfo);
|
||||
promises.push(promise);
|
||||
}
|
||||
});
|
||||
@ -102,45 +111,6 @@ function buildAllTests(done: Function) {
|
||||
});
|
||||
}
|
||||
|
||||
function runAppScripts(folderName: string) {
|
||||
console.log('Running app scripts with', folderName);
|
||||
|
||||
let sassConfigPath = 'scripts/demos/sass.config.js';
|
||||
|
||||
let appEntryPoint = `dist/demos/${folderName}/main.ts`;
|
||||
let distDir = `dist/demos/${folderName}/`;
|
||||
|
||||
let tsConfig = distDir + 'tsconfig.json';
|
||||
|
||||
try {
|
||||
const scriptsCmd = spawnSync('ionic-app-scripts',
|
||||
['build',
|
||||
'--prod',
|
||||
'--sass', sassConfigPath,
|
||||
'--appEntryPoint', appEntryPoint,
|
||||
'--srcDir', distDir,
|
||||
'--wwwDir', distDir,
|
||||
'--tsconfig', tsConfig
|
||||
]);
|
||||
|
||||
if (scriptsCmd.status !== 0) {
|
||||
return Promise.reject(scriptsCmd.stderr.toString());
|
||||
}
|
||||
|
||||
console.log(scriptsCmd.output.toString());
|
||||
return Promise.resolve();
|
||||
} catch (ex) {
|
||||
return Promise.reject(ex);
|
||||
}
|
||||
}
|
||||
|
||||
function getFolders(dir) {
|
||||
return readdirSync(dir)
|
||||
.filter(function(file) {
|
||||
return statSync(join(dir, file)).isDirectory();
|
||||
});
|
||||
}
|
||||
|
||||
task('demos.watchProd', (done: Function) => {
|
||||
const folderInfo = getFolderInfo();
|
||||
let demoTestPath = DEMOS_SRC_ROOT;
|
||||
|
@ -1,36 +1,42 @@
|
||||
import { accessSync, F_OK, readFileSync, writeFileSync } from 'fs';
|
||||
import { accessSync, F_OK, readFileSync, stat } from 'fs';
|
||||
import { dirname, join } from 'path';
|
||||
|
||||
import * as glob from 'glob';
|
||||
import { dest, src, start, task } from 'gulp';
|
||||
import * as gulpif from 'gulp-if';
|
||||
import * as watch from 'gulp-watch';
|
||||
import { template } from 'lodash';
|
||||
import * as rollup from 'rollup';
|
||||
import * as nodeResolve from 'rollup-plugin-node-resolve';
|
||||
import * as commonjs from 'rollup-plugin-commonjs';
|
||||
import * as runSequence from 'run-sequence';
|
||||
import { obj } from 'through2';
|
||||
import * as VinylFile from 'vinyl';
|
||||
|
||||
import { DIST_E2E_COMPONENTS_ROOT, DIST_E2E_ROOT, DIST_NAME, E2E_NAME, ES5, ES_2015, LOCAL_SERVER_PORT, PROJECT_ROOT, SCRIPTS_ROOT, SRC_COMPONENTS_ROOT, SRC_ROOT } from '../constants';
|
||||
import { createTempTsConfig, deleteFiles, getFolderInfo, runNgc } from '../util';
|
||||
import { DIST_E2E_ROOT, DIST_NAME, E2E_NAME, ES5, ES_2015, LOCAL_SERVER_PORT, DEMOS_SRC_ROOT, SCRIPTS_ROOT, SRC_ROOT } from '../constants';
|
||||
import { createTempTsConfig, getFolderInfo, getFolders, runAppScripts} from '../util';
|
||||
|
||||
task('e2e.prod', e2eBuild);
|
||||
|
||||
function e2eBuild(done: (err: any) => void) {
|
||||
runSequence(
|
||||
'e2e.copyIonic',
|
||||
'e2e.clean',
|
||||
'e2e.polyfill',
|
||||
'e2e.copySource',
|
||||
'e2e.compileTests',
|
||||
'e2e.copyExternalDependencies',
|
||||
'e2e.sass',
|
||||
'e2e.fonts',
|
||||
'e2e.bundleProd',
|
||||
'e2e.compileTests',
|
||||
done);
|
||||
}
|
||||
|
||||
task('e2e.copyIonic', (done: (err: any) => void) => {
|
||||
runSequence(
|
||||
'compile.release',
|
||||
'release.compileSass',
|
||||
'release.fonts',
|
||||
'release.sass',
|
||||
'release.createUmdBundle',
|
||||
done);
|
||||
});
|
||||
|
||||
task('e2e.copySource', (done: Function) => {
|
||||
|
||||
const buildConfig = require('../../build/config');
|
||||
@ -44,7 +50,7 @@ task('e2e.copySource', (done: Function) => {
|
||||
|
||||
function createIndexHTML() {
|
||||
const indexTemplate = readFileSync(`${SCRIPTS_ROOT}/${E2E_NAME}/e2e.template.prod.html`);
|
||||
const indexTs = readFileSync(`${SCRIPTS_ROOT}/${E2E_NAME}/entry.ts`);
|
||||
const indexTs = readFileSync(`${SCRIPTS_ROOT}/${E2E_NAME}/main.ts`);
|
||||
|
||||
return obj(function (file, enc, next) {
|
||||
this.push(new VinylFile({
|
||||
@ -55,7 +61,7 @@ task('e2e.copySource', (done: Function) => {
|
||||
this.push(new VinylFile({
|
||||
base: file.base,
|
||||
contents: new Buffer(indexTs),
|
||||
path: join(dirname(file.path), 'entry.ts'),
|
||||
path: join(dirname(file.path), 'main.ts'),
|
||||
}));
|
||||
next(null, file);
|
||||
});
|
||||
@ -97,108 +103,64 @@ task('e2e.copySource', (done: Function) => {
|
||||
|
||||
task('e2e.compileTests', (done: Function) => {
|
||||
let folderInfo = getFolderInfo();
|
||||
buildE2ETests(folderInfo, done);
|
||||
});
|
||||
|
||||
function buildE2ETests(folderInfo: any, done: Function) {
|
||||
let includeGlob = ['./components/*/test/*/app.module.ts', './components/*/test/*/entry.ts'];
|
||||
if (folderInfo.componentName && folderInfo.componentTest) {
|
||||
includeGlob = [
|
||||
`./components/${folderInfo.componentName}/test/${folderInfo.componentTest}/app.module.ts`,
|
||||
`./components/${folderInfo.componentName}/test/${folderInfo.componentTest}/entry.ts`,
|
||||
];
|
||||
buildTest(folderInfo);
|
||||
} else {
|
||||
buildAllTests(done);
|
||||
}
|
||||
createTempTsConfig(includeGlob, ES5, ES_2015, `${PROJECT_ROOT}/tsconfig.json`, `${DIST_E2E_ROOT}/tsconfig.json`);
|
||||
runNgc(`${DIST_E2E_ROOT}/tsconfig.json`, (err) => {
|
||||
if (err) {
|
||||
done(err);
|
||||
return;
|
||||
}
|
||||
// clean up any .ts files that remain
|
||||
deleteFiles([`${DIST_E2E_ROOT}/**/*.ts`, `!${DIST_E2E_ROOT}/**/*.ngfactory.ts`, `!${DIST_E2E_ROOT}/**/*.d.ts`], done);
|
||||
});
|
||||
}
|
||||
|
||||
task('e2e.bundleProd', (done) => {
|
||||
let includeGlob = `${DIST_E2E_ROOT}/components/*/test/*/entry.js`;
|
||||
let folderInfo = getFolderInfo();
|
||||
if (folderInfo.componentName && folderInfo.componentTest) {
|
||||
includeGlob = `${DIST_E2E_ROOT}/components/${folderInfo.componentName}/test/${folderInfo.componentTest}/entry.js`;
|
||||
}
|
||||
glob(includeGlob, {}, function (er, files) {
|
||||
var directories = files.map(function (file) {
|
||||
return dirname(file);
|
||||
});
|
||||
|
||||
let indexFileContents = directories.map(function (dir) {
|
||||
let testName = dir.replace(`${DIST_E2E_ROOT}/components/`, '');
|
||||
let fileName = dir.replace(`${PROJECT_ROOT}`, '');
|
||||
return `<p><a href="${fileName}/index.html">${testName}</a></p>`;
|
||||
}, []);
|
||||
function buildTest(folderInfo: any) {
|
||||
let includeGlob = [`./dist/e2e/components/${folderInfo.componentName}/test/${folderInfo.componentTest}/*.ts`];
|
||||
let pathToWriteFile = `${DIST_E2E_ROOT}/components/${folderInfo.componentName}/test/${folderInfo.componentTest}/tsconfig.json`;
|
||||
|
||||
writeFileSync(`${DIST_E2E_ROOT}/index.html`,
|
||||
'<!DOCTYPE html><html lang="en"><head></head><body style="width: 500px; margin: 100px auto">\n' +
|
||||
indexFileContents.join('\n') +
|
||||
'</center></body></html>'
|
||||
);
|
||||
createTempTsConfig(includeGlob, ES5, ES_2015, `${DEMOS_SRC_ROOT}/tsconfig.json`, pathToWriteFile);
|
||||
|
||||
createBundles(files).then(() => {
|
||||
let sassConfigPath = 'scripts/e2e/sass.config.js';
|
||||
|
||||
let appEntryPoint = `dist/e2e/components/${folderInfo.componentName}/test/${folderInfo.componentTest}/main.ts`;
|
||||
let distDir = `dist/e2e/components/${folderInfo.componentName}/test/${folderInfo.componentTest}/`;
|
||||
|
||||
return runAppScripts(folderInfo, sassConfigPath, appEntryPoint, distDir);
|
||||
}
|
||||
|
||||
function buildAllTests(done: Function) {
|
||||
let folders = getFolders('./dist/e2e/components');
|
||||
let promises: Promise<any>[] = [];
|
||||
|
||||
folders.forEach(folder => {
|
||||
console.log(folder);
|
||||
stat(`./dist/e2e/components/${folder}/test`, function(err, stat) {
|
||||
if (err == null) {
|
||||
let testFolders = getFolders(`./dist/e2e/components/${folder}/test`);
|
||||
|
||||
testFolders.forEach(test => {
|
||||
console.log('build test for ', folder, test);
|
||||
let folderInfo = {
|
||||
componentName: folder,
|
||||
componentTest: test
|
||||
};
|
||||
const promise = buildTest(folderInfo);
|
||||
promises.push(promise);
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Promise.all(promises).then(() => {
|
||||
done();
|
||||
}).catch(err => {
|
||||
done(err);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
function createBundles(files: string[]) {
|
||||
let start;
|
||||
if (!files) {
|
||||
return Promise.reject(new Error('list of files is null'));
|
||||
} else if (files.length === 0) {
|
||||
return Promise.resolve();
|
||||
} else {
|
||||
const outputFileName = join(dirname(files[0]), 'app.bundle.js');
|
||||
start = Date.now();
|
||||
return bundle(files[0], outputFileName).then(() => {
|
||||
const end = Date.now();
|
||||
const seconds = (end - start) / 1000;
|
||||
console.log(`Took ${seconds} seconds to process ${files[0]}`);
|
||||
const remainingFiles = files.concat();
|
||||
remainingFiles.shift();
|
||||
return createBundles(remainingFiles);
|
||||
}).catch(err => {
|
||||
return Promise.reject(err);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function bundle(inputFile: string, outputFile: string): Promise<any> {
|
||||
console.log(`Starting rollup on ${inputFile} ... writing to ${outputFile}`);
|
||||
return rollup.rollup({
|
||||
entry: inputFile,
|
||||
plugins: [
|
||||
commonjs(),
|
||||
nodeResolve({
|
||||
module: true,
|
||||
jsnext: true,
|
||||
main: true,
|
||||
extensions: ['.js']
|
||||
})
|
||||
]
|
||||
}).then(bundle => {
|
||||
return bundle.write({
|
||||
format: 'iife',
|
||||
dest: outputFile,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
task('e2e.watchProd', ['e2e.copyExternalDependencies', 'e2e.sass', 'e2e.fonts'], (done: Function) => {
|
||||
task('e2e.watchProd', (done: Function) => {
|
||||
const folderInfo = getFolderInfo();
|
||||
let e2eTestPath = SRC_COMPONENTS_ROOT;
|
||||
let e2eTestPath = SRC_ROOT;
|
||||
|
||||
if (folderInfo.componentName && folderInfo.componentTest) {
|
||||
e2eTestPath = join(SRC_COMPONENTS_ROOT, folderInfo.componentName, 'test', folderInfo.componentTest, 'app.module.ts');
|
||||
e2eTestPath = join(`${SRC_ROOT}/components/${folderInfo.componentName}/test/${folderInfo.componentTest}/app.module.ts`);
|
||||
}
|
||||
|
||||
try {
|
||||
@ -208,13 +170,13 @@ task('e2e.watchProd', ['e2e.copyExternalDependencies', 'e2e.sass', 'e2e.fonts'],
|
||||
return;
|
||||
}
|
||||
|
||||
if (e2eComponentsExists()) {
|
||||
if (e2eComponentsExists(folderInfo)) {
|
||||
// already generated the e2e directory
|
||||
e2eWatch(folderInfo.componentName, folderInfo.componentTest);
|
||||
|
||||
} else {
|
||||
// generate the e2e directory
|
||||
console.log('Generated e2e builds first...');
|
||||
console.log('Generate e2e builds first...');
|
||||
e2eBuild(() => {
|
||||
e2eWatch(folderInfo.componentName, folderInfo.componentTest);
|
||||
});
|
||||
@ -224,7 +186,7 @@ task('e2e.watchProd', ['e2e.copyExternalDependencies', 'e2e.sass', 'e2e.fonts'],
|
||||
function e2eWatch(componentName: string, componentTest: string) {
|
||||
// If any tests change within components then run e2e.resources.
|
||||
watch([
|
||||
'src/components/*/test/**/*'
|
||||
'e2e/src/**/*'
|
||||
],
|
||||
function (file) {
|
||||
console.log('start e2e.resources - ' + JSON.stringify(file.history, null, 2));
|
||||
@ -248,14 +210,25 @@ function e2eWatch(componentName: string, componentTest: string) {
|
||||
start('e2e.sass');
|
||||
});
|
||||
|
||||
console.log(`http://localhost:${LOCAL_SERVER_PORT}/${DIST_NAME}/${E2E_NAME}/components/${componentName}/test/${componentTest}/`);
|
||||
let serverUrl = `http://localhost:${LOCAL_SERVER_PORT}/${DIST_NAME}/${E2E_NAME}`;
|
||||
if (componentName) {
|
||||
serverUrl += `/${componentName}`;
|
||||
}
|
||||
|
||||
console.log(serverUrl);
|
||||
|
||||
start('e2e.serve');
|
||||
}
|
||||
|
||||
function e2eComponentsExists(): boolean {
|
||||
function e2eComponentsExists(folderInfo: any): boolean {
|
||||
let componentPath = `${DIST_E2E_ROOT}/components`;
|
||||
|
||||
if (folderInfo.componentName && folderInfo.componentTest) {
|
||||
componentPath += `/${folderInfo.componentName}/test/${folderInfo.componentTest}/build`;
|
||||
}
|
||||
|
||||
try {
|
||||
accessSync(DIST_E2E_COMPONENTS_ROOT, F_OK);
|
||||
accessSync(componentPath, F_OK);
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
import { NODE_MODULES_ROOT, PROJECT_ROOT, SRC_ROOT } from './constants';
|
||||
import { spawnSync } from 'child_process';
|
||||
import { NODE_MODULES_ROOT, SRC_ROOT } from './constants';
|
||||
import { src, dest } from 'gulp';
|
||||
import { join } from 'path';
|
||||
import * as fs from 'fs';
|
||||
import { readdirSync, readFileSync, statSync, writeFileSync } from 'fs';
|
||||
import { rollup } from 'rollup';
|
||||
import { Replacer } from 'strip-function';
|
||||
import * as commonjs from 'rollup-plugin-commonjs';
|
||||
@ -32,7 +33,7 @@ export function mergeObjects(obj1: any, obj2: any ) {
|
||||
}
|
||||
|
||||
function getRootTsConfig(pathToReadFile): any {
|
||||
const json = fs.readFileSync(pathToReadFile);
|
||||
const json = readFileSync(pathToReadFile);
|
||||
|
||||
let tsConfig = JSON.parse(json.toString());
|
||||
return tsConfig;
|
||||
@ -53,7 +54,7 @@ export function createTempTsConfig(includeGlob: string[], target: string, module
|
||||
}
|
||||
config.include = includeGlob;
|
||||
let json = JSON.stringify(config, null, 2);
|
||||
fs.writeFileSync(pathToWriteFile, json);
|
||||
writeFileSync(pathToWriteFile, json);
|
||||
}
|
||||
|
||||
function removeDebugStatements() {
|
||||
@ -133,12 +134,12 @@ export function compileSass(destinationPath: string) {
|
||||
}
|
||||
|
||||
export function setSassIonicVersion(version: string) {
|
||||
fs.writeFileSync(join(SRC_ROOT, 'themes/version.scss'), `$ionic-version: "${version}";`);
|
||||
writeFileSync(join(SRC_ROOT, 'themes/version.scss'), `$ionic-version: "${version}";`);
|
||||
}
|
||||
|
||||
export function copyFile(srcPath: string, destPath: string) {
|
||||
const sourceData = fs.readFileSync(srcPath);
|
||||
fs.writeFileSync(destPath, sourceData);
|
||||
const sourceData = readFileSync(srcPath);
|
||||
writeFileSync(destPath, sourceData);
|
||||
}
|
||||
|
||||
export function runNgc(pathToConfigFile: string, done: Function) {
|
||||
@ -177,6 +178,38 @@ export function runWebpack(pathToWebpackConfig: string, done: Function) {
|
||||
});
|
||||
}
|
||||
|
||||
export function runAppScripts(folderInfo: any, sassConfigPath: string, appEntryPoint: string, distDir: string) {
|
||||
console.log('Running ionic-app-scripts build with', folderInfo.componentName, '/', folderInfo.componentTest);
|
||||
let tsConfig = distDir + 'tsconfig.json';
|
||||
let scriptArgs = [
|
||||
'build',
|
||||
'--prod',
|
||||
'--sass', sassConfigPath,
|
||||
'--appEntryPoint', appEntryPoint,
|
||||
'--srcDir', distDir,
|
||||
'--wwwDir', distDir,
|
||||
'--tsconfig', tsConfig
|
||||
];
|
||||
|
||||
const debug: boolean = argv.debug;
|
||||
if (debug) {
|
||||
scriptArgs.push('--debug');
|
||||
}
|
||||
|
||||
try {
|
||||
const scriptsCmd = spawnSync('ionic-app-scripts', scriptArgs);
|
||||
|
||||
if (scriptsCmd.status !== 0) {
|
||||
return Promise.reject(scriptsCmd.stderr.toString());
|
||||
}
|
||||
|
||||
console.log(scriptsCmd.output.toString());
|
||||
return Promise.resolve();
|
||||
} catch (ex) {
|
||||
return Promise.reject(ex);
|
||||
}
|
||||
}
|
||||
|
||||
/** Resolves the path for a node package executable. */
|
||||
export function getBinaryPath(packageName: string, executable = packageName): string {
|
||||
return resolveBin.sync(packageName, {executable});
|
||||
@ -288,3 +321,10 @@ export function getFolderInfo() {
|
||||
componentTest: componentTest
|
||||
};
|
||||
}
|
||||
|
||||
export function getFolders(dir) {
|
||||
return readdirSync(dir)
|
||||
.filter(function(file) {
|
||||
return statSync(join(dir, file)).isDirectory();
|
||||
});
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule, ActionSheetController, AlertController, ModalController, ViewController, Platform } from '../../../..';
|
||||
import { IonicApp, IonicModule, ActionSheetController, AlertController, ModalController, ViewController, Platform } from '../../../../../ionic-angular';
|
||||
|
||||
@Component({
|
||||
templateUrl: 'main.html'
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule, AlertController, ModalController, ViewController } from '../../../..';
|
||||
import { IonicApp, IonicModule, AlertController, ModalController, ViewController } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule, AlertController, LoadingController, NavController } from '../../../..';
|
||||
import { IonicApp, IonicModule, AlertController, LoadingController, NavController } from '../../../../../ionic-angular';
|
||||
import { FormBuilder, Validators } from '@angular/forms';
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { Animation, Config, IonicApp, IonicModule, Platform } from '../../../..';
|
||||
import { Animation, Config, IonicApp, IonicModule, Platform } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule, NavController, ModalController, ViewController } from '../../../..';
|
||||
import { IonicApp, IonicModule, NavController, ModalController, ViewController } from '../../../../../ionic-angular';
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, ViewChild, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule, MenuController, NavController, AlertController, Nav, Refresher } from '../../../..';
|
||||
import { IonicApp, IonicModule, MenuController, NavController, AlertController, Nav, Refresher } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule, App } from '../../../..';
|
||||
import { IonicApp, IonicModule, App } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule, Config } from '../../../..';
|
||||
import { IonicApp, IonicModule, Config } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { NgModule, Component } from '@angular/core';
|
||||
import { IonicApp, IonicModule, App } from '../../../..';
|
||||
import { IonicApp, IonicModule, App } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { NgModule, Component } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { NgModule, Component } from '@angular/core';
|
||||
import { IonicApp, IonicModule, App } from '../../../..';
|
||||
import { IonicApp, IonicModule, App } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { FormControl, FormGroup } from '@angular/forms';
|
||||
import { IonicApp, IonicModule, Checkbox } from '../../../..';
|
||||
import { IonicApp, IonicModule, Checkbox } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule, ViewChild } from '@angular/core';
|
||||
import { IonicApp, IonicModule, Content, ScrollEvent } from '../../../..';
|
||||
import { IonicApp, IonicModule, Content, ScrollEvent } from '../../../../../ionic-angular';
|
||||
|
||||
@Component({
|
||||
templateUrl: 'tabs.html'
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule, ScrollEvent } from '../../../..';
|
||||
import { IonicApp, IonicModule, ScrollEvent } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule, ScrollEvent } from '../../../..';
|
||||
import { IonicApp, IonicModule, ScrollEvent } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { FormControl, FormGroup } from '@angular/forms';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule, FabContainer } from '../../../..';
|
||||
import { IonicApp, IonicModule, FabContainer } from '../../../../../ionic-angular';
|
||||
|
||||
@Component({
|
||||
templateUrl: 'main.html'
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, Input, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
@Component({
|
||||
templateUrl: 'main.html'
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, ViewChild, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule, InfiniteScroll, NavController } from '../../../..';
|
||||
import { IonicApp, IonicModule, InfiniteScroll, NavController } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule, InfiniteScroll } from '../../../..';
|
||||
import { IonicApp, IonicModule, InfiniteScroll } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule, TextInput } from '../../../..';
|
||||
import { IonicApp, IonicModule, TextInput } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { FormBuilder, Validators } from '@angular/forms';
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { FormBuilder, Validators } from '@angular/forms';
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule, NavController, NavParams } from '../../../..';
|
||||
import { IonicApp, IonicModule, NavController, NavParams } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, ChangeDetectorRef, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule, reorderArray } from '../../../..';
|
||||
import { IonicApp, IonicModule, reorderArray } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, ViewChild, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule, AlertController, NavController, List, ItemSliding, ToastController } from '../../../..';
|
||||
import { IonicApp, IonicModule, AlertController, NavController, List, ItemSliding, ToastController } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
import { IonicApp, IonicModule } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, ViewEncapsulation, NgModule } from '@angular/core';
|
||||
import { App, IonicApp, IonicModule, LoadingController, NavController } from '../../../..';
|
||||
import { App, IonicApp, IonicModule, LoadingController, NavController } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule, LoadingController, NavController } from '../../../..';
|
||||
import { IonicApp, IonicModule, LoadingController, NavController } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, ViewChild, NgModule } from '@angular/core';
|
||||
import { AlertController, IonicApp, IonicModule, MenuController, ModalController, NavController, Nav, ViewController } from '../../../..';
|
||||
import { AlertController, IonicApp, IonicModule, MenuController, ModalController, NavController, Nav, ViewController } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule, MenuController } from '../../../..';
|
||||
import { IonicApp, IonicModule, MenuController } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, ViewChild, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule, App, MenuController, Nav } from '../../../..';
|
||||
import { IonicApp, IonicModule, App, MenuController, Nav } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule, MenuController } from '../../../..';
|
||||
import { IonicApp, IonicModule, MenuController } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, ViewChild, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule, Nav, AlertController } from '../../../..';
|
||||
import { IonicApp, IonicModule, Nav, AlertController } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({templateUrl: 'page1.html'})
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { Component, ViewChild, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule, Nav, AlertController } from '../../../..';
|
||||
import { IonicApp, IonicModule, Nav, AlertController } from '../../../../../ionic-angular';
|
||||
|
||||
|
||||
@Component({templateUrl: 'page1.html'})
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user