chore(demos): update demos build task to use app-scripts (#9830)

* chore(build): WIP getting ionic working with app-scripts

the tsconfig file change is just for testing, this will need to be
undone

* chore(demos): update tsconfig and gitignore for demos

update tsconfig and gitinogre for demos

* chore(build): WIP check in progress with building with app-scripts

this only works with demos/action-sheet currently

* refactor(demos): add custom copy config

add custom copy config

* chore(tsconfig): revert root tsconfig

* chore(demos): change import paths

* chore(demos): move sass config, add new tsconfig, update template

* chore(scripts): update demos tasks to use app scripts with folder name

tweak the createTempTsConfig function to include a path to read from,
move getFolderInfo into util to share

at this point you should be able to run `gulp demos.prod` with a folder
e.g. `--f=alert` and open the index of that test to see it. Doesn’t
work yet with all of the tests at once. Need to have ran `gulp
release.prepareReleasePackage` first.

* chore(build): WIP working on getting all of the demos building

* chore(demos): update demos task for app-scripts build

* chore(demos): fix tslint errors thrown by app-scripts

* chore(demos): get the demos working with fonts and variable file

* chore(demos): add watch task to the new prod task

* chore(demos): remove old demos.prod file and rename new one to it

* chore(npm): remove build npm script

* chore(demos): only log component name in url if one was passed
This commit is contained in:
Brandy Carney
2017-01-03 11:23:14 -05:00
committed by Justin Willis
parent cd342c29d4
commit b69eed5220
54 changed files with 404 additions and 206 deletions

View File

@ -12,10 +12,9 @@ import * as commonjs from 'rollup-plugin-commonjs';
import * as runSequence from 'run-sequence';
import { obj } from 'through2';
import * as VinylFile from 'vinyl';
import { argv } from 'yargs';
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, runNgc } from '../util';
import { createTempTsConfig, deleteFiles, getFolderInfo, runNgc } from '../util';
task('e2e.prod', e2eBuild);
@ -109,7 +108,7 @@ function buildE2ETests(folderInfo: any, done: Function) {
`./components/${folderInfo.componentName}/test/${folderInfo.componentTest}/entry.ts`,
];
}
createTempTsConfig(includeGlob, ES5, ES_2015, `${DIST_E2E_ROOT}/tsconfig.json`);
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);
@ -261,19 +260,4 @@ function e2eComponentsExists(): boolean {
return false;
}
return true;
}
function getFolderInfo() {
let componentName: string = null;
let componentTest: string = null;
const folder: string = argv.folder || argv.f;
if (folder && folder.length) {
const folderSplit = folder.split('/');
componentName = folderSplit[0];
componentTest = (folderSplit.length > 1 ? folderSplit[1] : 'basic');
}
return {
componentName: componentName,
componentTest: componentTest
};
}