Skip to content

Commit

Permalink
[AAE-5674] Library for tooling in adf-cli (#7270)
Browse files Browse the repository at this point in the history
* [AAE-5674] Library for tooling in adf-core

* Changes done as per PR comments

* Changes done as per comments
  • Loading branch information
Sushmitha-Vk committed Oct 5, 2021
1 parent dbc014d commit e34247c
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 0 deletions.
24 changes: 24 additions & 0 deletions lib/cli/tooling/dotenv.ts
@@ -0,0 +1,24 @@
/*!
* @license
* Copyright 2019 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

export function dotenv() {
return require('dotenv-expand')(require('dotenv'));
}

export function dotenvConfig(params?: any) {
return require('dotenv-expand')(require('dotenv').config(params));
}
18 changes: 18 additions & 0 deletions lib/cli/tooling/index.ts
@@ -0,0 +1,18 @@
/*!
* @license
* Copyright 2019 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

export * from './dotenv';
11 changes: 11 additions & 0 deletions lib/cli/tooling/package.json
@@ -0,0 +1,11 @@
{
"ngPackage": {
"lib": {
"entryFile": "./index.ts",
"flatModuleFile": "adf-cli-tooling"
}
},
"peerDependencies": {
"dotenv-expand": "^5.1.0"
}
}
5 changes: 5 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 @@ -97,6 +97,7 @@
"classlist.js": "1.1.20150312",
"cropperjs": "1.5.12",
"custom-event-polyfill": "^1.0.7",
"dotenv-expand": "^5.1.0",
"minimatch": "^3.0.4",
"minimatch-browser": "1.0.0",
"moment-es6": "^1.0.0",
Expand Down

0 comments on commit e34247c

Please sign in to comment.