@@ -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,25 +89,18 @@ var _excludeMatchers = _excludePatterns.map(function(excludePattern){
8989} ) ;
9090
9191var _exampleBoilerplateFiles = [
92- '.editorconfig' ,
9392 'a2docs.css' ,
9493 'karma.conf.js' ,
9594 'karma-test-shim.js' ,
9695 'package.json' ,
9796 'styles.css' ,
9897 'systemjs.config.js' ,
9998 'tsconfig.json' ,
100- 'tslint.json' ,
101- 'typings.json' ,
10299 'wallaby.js'
103100 ] ;
104101
105102var _exampleDartWebBoilerPlateFiles = [ 'a2docs.css' , 'styles.css' ] ;
106103
107- var _exampleProtractorBoilerplateFiles = [
108- 'tsconfig.json'
109- ] ;
110-
111104var _exampleConfigFilename = 'example-config.json' ;
112105
113106var _styleLessName = 'a2docs.less' ;
@@ -200,18 +193,13 @@ function runE2e() {
200193 });
201194 */
202195 // Not 'fast'; do full setup
203- gutil . log ( 'runE2e: install _protractor stuff' ) ;
204- 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 } ) ;
205198 promise = spawnInfo . promise
206- . then ( function ( ) {
207- gutil . log ( 'runE2e: install _examples stuff' ) ;
208- spawnInfo = spawnExt ( 'npm' , [ 'install' ] , { cwd : EXAMPLES_PATH } )
209- return spawnInfo . promise ;
210- } )
211199 . then ( function ( ) {
212200 buildStyles ( copyExampleBoilerplate , _ . noop ) ;
213201 gutil . log ( 'runE2e: update webdriver' ) ;
214- spawnInfo = spawnExt ( 'npm' , [ 'run' , 'webdriver:update' ] , { cwd : EXAMPLES_PROTRACTOR_PATH } ) ;
202+ spawnInfo = spawnExt ( 'npm' , [ 'run' , 'webdriver:update' ] , { cwd : EXAMPLES_PATH } ) ;
215203 return spawnInfo . promise ;
216204 } ) ;
217205 } ;
@@ -246,11 +234,10 @@ function findAndRunE2eTests(filter, outputFile) {
246234 fs . writeFileSync ( outputFile , header ) ;
247235
248236 // create an array of combos where each
249- // combo consists of { examplePath: ... , protractorConfigFilename: ... }
237+ // combo consists of { examplePath: ... }
250238 var examplePaths = [ ] ;
251239 var e2eSpecPaths = getE2eSpecPaths ( EXAMPLES_PATH ) ;
252240 e2eSpecPaths . forEach ( function ( specPath ) {
253- var destConfig = path . join ( specPath , 'protractor.config.js' ) ;
254241 // get all of the examples under each dir where a pcFilename is found
255242 localExamplePaths = getExamplePaths ( specPath , true ) ;
256243 // Filter by language
@@ -319,7 +306,7 @@ function runProtractor(prepPromise, appDir, appRunSpawnInfo, outputFile) {
319306 // start protractor
320307
321308 var spawnInfo = spawnExt ( 'npm' , [ 'run' , 'protractor' , '--' , 'protractor.config.js' ,
322- `--specs=${ specFilename } ` , '--params.appDir=' + appDir , '--params.outputFile=' + outputFile ] , { cwd : EXAMPLES_PROTRACTOR_PATH } ) ;
309+ `--specs=${ specFilename } ` , '--params.appDir=' + appDir , '--params.outputFile=' + outputFile ] , { cwd : EXAMPLES_PATH } ) ;
323310
324311 spawnInfo . proc . stderr . on ( 'data' , function ( data ) {
325312 transpileError = transpileError || / n p m E R R ! E x i t s t a t u s 1 0 0 / . test ( data . toString ( ) ) ;
@@ -481,12 +468,12 @@ function buildStyles(cb, done){
481468function copyExampleBoilerplate ( ) {
482469 gutil . log ( 'Copying example boilerplate files' ) ;
483470 var sourceFiles = _exampleBoilerplateFiles . map ( function ( fn ) {
484- return path . join ( EXAMPLES_PATH , fn ) ;
471+ return path . join ( BOILERPLATE_PATH , fn ) ;
485472 } ) ;
486473 var examplePaths = excludeDartPaths ( getExamplePaths ( EXAMPLES_PATH ) ) ;
487474
488475 var dartWebSourceFiles = _exampleDartWebBoilerPlateFiles . map ( function ( fn ) {
489- return path . join ( EXAMPLES_PATH , fn ) ;
476+ return path . join ( BOILERPLATE_PATH , fn ) ;
490477 } ) ;
491478 var dartExampleWebPaths = getDartExampleWebPaths ( EXAMPLES_PATH ) ;
492479
@@ -495,14 +482,6 @@ function copyExampleBoilerplate() {
495482 return copyFiles ( sourceFiles , examplePaths , destFileMode )
496483 . then ( function ( ) {
497484 return copyFiles ( dartWebSourceFiles , dartExampleWebPaths , destFileMode ) ;
498- } )
499- // copy certain files from _examples/_protractor dir to each subdir that contains an e2e-spec file.
500- . then ( function ( ) {
501- var protractorSourceFiles =
502- _exampleProtractorBoilerplateFiles
503- . map ( function ( name ) { return path . join ( EXAMPLES_PROTRACTOR_PATH , name ) ; } ) ; ;
504- var e2eSpecPaths = getE2eSpecPaths ( EXAMPLES_PATH ) ;
505- return copyFiles ( protractorSourceFiles , e2eSpecPaths , destFileMode ) ;
506485 } ) ;
507486}
508487
@@ -581,11 +560,6 @@ function deleteExampleBoilerPlate() {
581560 return deleteFiles ( _exampleBoilerplateFiles , examplePaths )
582561 . then ( function ( ) {
583562 return deleteFiles ( _exampleDartWebBoilerPlateFiles , dartExampleWebPaths ) ;
584- } )
585- . then ( function ( ) {
586- var protractorFiles = _exampleProtractorBoilerplateFiles ;
587- var e2eSpecPaths = getE2eSpecPaths ( EXAMPLES_PATH ) ;
588- return deleteFiles ( protractorFiles , e2eSpecPaths ) ;
589563 } ) ;
590564}
591565
@@ -805,7 +779,7 @@ gulp.task('_harp-compile', function() {
805779
806780gulp . task ( '_shred-devguide-examples' , [ '_shred-clean-devguide' , '_copy-example-boilerplate' ] , function ( ) {
807781 // Split big shredding task into partials 2016-06-14
808- var examplePaths = globby . sync ( EXAMPLES_PATH + '/*/' , { ignore : [ '/node_modules' , 'typings/' , '_protractor/' ] } ) ;
782+ var examplePaths = globby . sync ( EXAMPLES_PATH + '/*/' , { ignore : [ '/node_modules' , 'typings/' ] } ) ;
809783 var promise = Promise . resolve ( true ) ;
810784 examplePaths . forEach ( function ( examplePath ) {
811785 promise = promise . then ( ( ) => docShredder . shredSingleExampleDir ( _devguideShredOptions , examplePath ) ) ;
@@ -864,7 +838,6 @@ gulp.task('lint', function() {
864838 '!./public/docs/_examples/**/ts-snippets/*.ts' ,
865839 '!./public/docs/_examples/style-guide/ts/**/*.avoid.ts' ,
866840 '!./public/docs/_examples/**/node_modules/**/*' ,
867- '!./public/docs/_examples/_protractor/**/*' ,
868841 '!./public/docs/_examples/**/typings/**/*' ,
869842 '!./public/docs/_examples/**/typings-ng1/**/*' ,
870843 '!./public/docs/_examples/**/build/**/*' ,
0 commit comments