[AAE-5674] Library for tooling in adf-cli (#7270)

* [AAE-5674] Library for tooling in adf-core

* Changes done as per PR comments

* Changes done as per comments
This commit is contained in:
Sushmitha V
2021-10-05 16:50:50 +05:30
committed by GitHub
parent dbc014d076
commit e34247c01e
5 changed files with 59 additions and 0 deletions

24
lib/cli/tooling/dotenv.ts Normal file
View File

@@ -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
lib/cli/tooling/index.ts Normal file
View File

@@ -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';

View File

@@ -0,0 +1,11 @@
{
"ngPackage": {
"lib": {
"entryFile": "./index.ts",
"flatModuleFile": "adf-cli-tooling"
}
},
"peerDependencies": {
"dotenv-expand": "^5.1.0"
}
}