Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Commit

Permalink
chore(types): split out config interface from configParser
Browse files Browse the repository at this point in the history
- split out config interface from configParser
- add comments from docs/referenceConf.js to lib/config.ts
- copies lib/config.ts to configuration.ts
- allows for users to `import {Config} from 'protractor/configuration';`
  • Loading branch information
cnishina committed Jul 1, 2016
1 parent c80cbbf commit 82fd8a5
Show file tree
Hide file tree
Showing 19 changed files with 578 additions and 76 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ xmloutput*
npm-debug.log

*.swp
configuration.ts
6 changes: 5 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ gulp.task('default',['prepublish']);

gulp.task('types', function(done) {
var folder = 'built';
var files = ['browser', 'element', 'locators', 'expectedConditions'];
var files = ['browser', 'element', 'locators', 'expectedConditions', 'config'];
var outputFile = path.resolve(folder, 'index.d.ts');
var contents = '';
files.forEach(file => {
Expand All @@ -86,6 +86,10 @@ gulp.task('types', function(done) {

// write contents to 'built/index.d.ts'
fs.writeFileSync(outputFile, contents);

// copy over config.ts file so users just need to import from 'protractor/config';
var configFile = fs.readFileSync(path.resolve('lib/config.ts')).toString();
fs.writeFileSync(path.resolve('configuration.ts'), configFile);
done();
});

Expand Down
Loading

0 comments on commit 82fd8a5

Please sign in to comment.