Skip to content

Commit

Permalink
feat: add Browser-or-Node (#158)
Browse files Browse the repository at this point in the history
* feat: add Browser-or-Node
  • Loading branch information
KyleTryon committed Oct 31, 2022
1 parent 80c13b9 commit 871b65b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
11 changes: 11 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Expand Up @@ -52,6 +52,7 @@
"webpack-node-externals": "^2.5.2"
},
"dependencies": {
"browser-or-node": "^2.0.0",
"yaml": "2.1.1"
},
"directories": {
Expand Down
9 changes: 7 additions & 2 deletions src/lib/Config/Pipeline/index.ts
@@ -1,5 +1,6 @@
import { Project } from './Project';
import { Git } from './Git';
import { isNode } from 'browser-or-node';
/**
* Not fully implemented yet. Fetch pipeline parameters from inside a CircleCI job.
* @alpha
Expand All @@ -13,8 +14,12 @@ export class Pipeline {
* Array of user defined parameters
*/
constructor() {
if (process.env.CIRCLECI == 'true') {
this._isLocal = false;
if (isNode) {
if (process.env.CIRCLECI == 'true') {
this._isLocal = false;
} else {
this._isLocal = true;
}
} else {
this._isLocal = true;
}
Expand Down

0 comments on commit 871b65b

Please sign in to comment.