@@ -37,7 +37,7 @@ var TEMP_PATH = './_temp';
3737var DOCS_PATH = path . join ( PUBLIC_PATH , 'docs' ) ;
3838
3939var EXAMPLES_PATH = path . join ( DOCS_PATH , '_examples' ) ;
40- var EXAMPLES_PROTRACTOR_PATH = path . join ( EXAMPLES_PATH , '_protractor ' ) ;
40+ var BOILERPLATE_PATH = path . join ( EXAMPLES_PATH , '_boilerplate ' ) ;
4141var NOT_API_DOCS_GLOB = path . join ( PUBLIC_PATH , './{docs/*/latest/!(api),!(docs)}/**/*.*' ) ;
4242var RESOURCES_PATH = path . join ( PUBLIC_PATH , 'resources' ) ;
4343var LIVE_EXAMPLES_PATH = path . join ( RESOURCES_PATH , 'live-examples' ) ;
@@ -89,22 +89,18 @@ var _excludeMatchers = _excludePatterns.map(function(excludePattern){
8989} ) ;
9090
9191var _exampleBoilerplateFiles = [
92- '.editorconfig' ,
9392 'a2docs.css' ,
9493 'package.json' ,
9594 'styles.css' ,
9695 'systemjs.config.js' ,
9796 'tsconfig.json' ,
9897 'tslint.json' ,
99- 'typings.json'
98+ 'typings.json' ,
99+ 'wallaby.js'
100100 ] ;
101101
102102var _exampleDartWebBoilerPlateFiles = [ 'a2docs.css' , 'styles.css' ] ;
103103
104- var _exampleProtractorBoilerplateFiles = [
105- 'tsconfig.json'
106- ] ;
107-
108104var _exampleConfigFilename = 'example-config.json' ;
109105
110106var _styleLessName = 'a2docs.less' ;
@@ -197,18 +193,13 @@ function runE2e() {
197193 });
198194 */
199195 // Not 'fast'; do full setup
200- gutil . log ( 'runE2e: install _protractor stuff' ) ;
201- var spawnInfo = spawnExt ( 'npm' , [ 'install' ] , { cwd : EXAMPLES_PROTRACTOR_PATH } ) ;
196+ gutil . log ( 'runE2e: install _examples stuff' ) ;
197+ var spawnInfo = spawnExt ( 'npm' , [ 'install' ] , { cwd : EXAMPLES_PATH } ) ;
202198 promise = spawnInfo . promise
203- . then ( function ( ) {
204- gutil . log ( 'runE2e: install _examples stuff' ) ;
205- spawnInfo = spawnExt ( 'npm' , [ 'install' ] , { cwd : EXAMPLES_PATH } )
206- return spawnInfo . promise ;
207- } )
208199 . then ( function ( ) {
209200 buildStyles ( copyExampleBoilerplate , _ . noop ) ;
210201 gutil . log ( 'runE2e: update webdriver' ) ;
211- spawnInfo = spawnExt ( 'npm' , [ 'run' , 'webdriver:update' ] , { cwd : EXAMPLES_PROTRACTOR_PATH } ) ;
202+ spawnInfo = spawnExt ( 'npm' , [ 'run' , 'webdriver:update' ] , { cwd : EXAMPLES_PATH } ) ;
212203 return spawnInfo . promise ;
213204 } ) ;
214205 } ;
@@ -243,11 +234,10 @@ function findAndRunE2eTests(filter, outputFile) {
243234 fs . writeFileSync ( outputFile , header ) ;
244235
245236 // create an array of combos where each
246- // combo consists of { examplePath: ... , protractorConfigFilename: ... }
237+ // combo consists of { examplePath: ... }
247238 var examplePaths = [ ] ;
248239 var e2eSpecPaths = getE2eSpecPaths ( EXAMPLES_PATH ) ;
249240 e2eSpecPaths . forEach ( function ( specPath ) {
250- var destConfig = path . join ( specPath , 'protractor.config.js' ) ;
251241 // get all of the examples under each dir where a pcFilename is found
252242 localExamplePaths = getExamplePaths ( specPath , true ) ;
253243 // Filter by language
@@ -316,7 +306,7 @@ function runProtractor(prepPromise, appDir, appRunSpawnInfo, outputFile) {
316306 // start protractor
317307
318308 var spawnInfo = spawnExt ( 'npm' , [ 'run' , 'protractor' , '--' , 'protractor.config.js' ,
319- `--specs=${ specFilename } ` , '--params.appDir=' + appDir , '--params.outputFile=' + outputFile ] , { cwd : EXAMPLES_PROTRACTOR_PATH } ) ;
309+ `--specs=${ specFilename } ` , '--params.appDir=' + appDir , '--params.outputFile=' + outputFile ] , { cwd : EXAMPLES_PATH } ) ;
320310
321311 spawnInfo . proc . stderr . on ( 'data' , function ( data ) {
322312 transpileError = transpileError || / n p m E R R ! E x i t s t a t u s 1 0 0 / . test ( data . toString ( ) ) ;
@@ -478,12 +468,12 @@ function buildStyles(cb, done){
478468function copyExampleBoilerplate ( ) {
479469 gutil . log ( 'Copying example boilerplate files' ) ;
480470 var sourceFiles = _exampleBoilerplateFiles . map ( function ( fn ) {
481- return path . join ( EXAMPLES_PATH , fn ) ;
471+ return path . join ( BOILERPLATE_PATH , fn ) ;
482472 } ) ;
483473 var examplePaths = excludeDartPaths ( getExamplePaths ( EXAMPLES_PATH ) ) ;
484474
485475 var dartWebSourceFiles = _exampleDartWebBoilerPlateFiles . map ( function ( fn ) {
486- return path . join ( EXAMPLES_PATH , fn ) ;
476+ return path . join ( BOILERPLATE_PATH , fn ) ;
487477 } ) ;
488478 var dartExampleWebPaths = getDartExampleWebPaths ( EXAMPLES_PATH ) ;
489479
@@ -492,14 +482,6 @@ function copyExampleBoilerplate() {
492482 return copyFiles ( sourceFiles , examplePaths , destFileMode )
493483 . then ( function ( ) {
494484 return copyFiles ( dartWebSourceFiles , dartExampleWebPaths , destFileMode ) ;
495- } )
496- // copy certain files from _examples/_protractor dir to each subdir that contains an e2e-spec file.
497- . then ( function ( ) {
498- var protractorSourceFiles =
499- _exampleProtractorBoilerplateFiles
500- . map ( function ( name ) { return path . join ( EXAMPLES_PROTRACTOR_PATH , name ) ; } ) ; ;
501- var e2eSpecPaths = getE2eSpecPaths ( EXAMPLES_PATH ) ;
502- return copyFiles ( protractorSourceFiles , e2eSpecPaths , destFileMode ) ;
503485 } ) ;
504486}
505487
@@ -578,11 +560,6 @@ function deleteExampleBoilerPlate() {
578560 return deleteFiles ( _exampleBoilerplateFiles , examplePaths )
579561 . then ( function ( ) {
580562 return deleteFiles ( _exampleDartWebBoilerPlateFiles , dartExampleWebPaths ) ;
581- } )
582- . then ( function ( ) {
583- var protractorFiles = _exampleProtractorBoilerplateFiles ;
584- var e2eSpecPaths = getE2eSpecPaths ( EXAMPLES_PATH ) ;
585- return deleteFiles ( protractorFiles , e2eSpecPaths ) ;
586563 } ) ;
587564}
588565
@@ -802,7 +779,7 @@ gulp.task('_harp-compile', function() {
802779
803780gulp . task ( '_shred-devguide-examples' , [ '_shred-clean-devguide' , '_copy-example-boilerplate' ] , function ( ) {
804781 // Split big shredding task into partials 2016-06-14
805- var examplePaths = globby . sync ( EXAMPLES_PATH + '/*/' , { ignore : [ '/node_modules' , 'typings/' , '_protractor/' ] } ) ;
782+ var examplePaths = globby . sync ( EXAMPLES_PATH + '/*/' , { ignore : [ '/node_modules' , 'typings/' ] } ) ;
806783 var promise = Promise . resolve ( true ) ;
807784 examplePaths . forEach ( function ( examplePath ) {
808785 promise = promise . then ( ( ) => docShredder . shredSingleExampleDir ( _devguideShredOptions , examplePath ) ) ;
@@ -861,7 +838,6 @@ gulp.task('lint', function() {
861838 '!./public/docs/_examples/**/ts-snippets/*.ts' ,
862839 '!./public/docs/_examples/style-guide/ts/**/*.avoid.ts' ,
863840 '!./public/docs/_examples/**/node_modules/**/*' ,
864- '!./public/docs/_examples/_protractor/**/*' ,
865841 '!./public/docs/_examples/**/typings/**/*' ,
866842 '!./public/docs/_examples/**/typings-ng1/**/*' ,
867843 '!./public/docs/_examples/**/build/**/*' ,
@@ -1122,7 +1098,7 @@ function getTypingsPaths(basePath) {
11221098
11231099function getExamplePaths ( basePath , includeBase ) {
11241100 // includeBase defaults to false
1125- return getPaths ( basePath , _exampleConfigFilename , includeBase )
1101+ return getPaths ( basePath , _exampleConfigFilename , includeBase ) ;
11261102}
11271103
11281104function getDartExampleWebPaths ( basePath ) {
@@ -1145,6 +1121,8 @@ function getFilenames(basePath, filename, includeBase) {
11451121 // ignore (skip) the top level version.
11461122 includePatterns . push ( "!" + path . join ( basePath , "/" + filename ) ) ;
11471123 }
1124+ // ignore (skip) the files in BOILERPLATE_PATH.
1125+ includePatterns . push ( "!" + path . join ( BOILERPLATE_PATH , "/" + filename ) ) ;
11481126 var nmPattern = path . join ( basePath , "**/node_modules/**" ) ;
11491127 var filenames = globby . sync ( includePatterns , { ignore : [ nmPattern ] } ) ;
11501128 return filenames ;
0 commit comments