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

Commit

Permalink
feat: add currentProjectRoot method
Browse files Browse the repository at this point in the history
  • Loading branch information
Romakita committed Jul 9, 2018
1 parent cf15858 commit a32ee0d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,10 @@ class Config {
return formatPath(path.join(this.get('projectRoot'), this.currentWebsite, '/code/Scripts/'));
}

get currentProjectRoot() {
return formatPath(path.join(this.get('projectRoot'), this.currentWebsite, '/code/'));
}

/**
*
* @returns {{src: string, featureDirectory: *, featureRoot: *, projectDirectory: *, projectRoot: *, foundationDirectory: *, buildDirectory: *, themeBuildDirectory: *|string}}
Expand Down
3 changes: 3 additions & 0 deletions test/unit/config.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ describe('Config', () => {
it('should return projectScriptsRoot', () => {
expect(config.projectScriptsRoot).to.contains(formatPath('src/Project/Common/code/Scripts/'));
});
it('should return currentProjectRoot', () => {
expect(config.currentProjectRoot).to.contains(formatPath('src/Project/Common/code/'));
});

it('should return directories', () => {
expect(config.directories).to.deep.eq({
Expand Down

0 comments on commit a32ee0d

Please sign in to comment.