Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
BeebuddyUtil
/
dma-common-backend
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit a2311c3a
authored
Oct 15, 2020
by
Beebuddy Builder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add env
1 parent
8fd71ec8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
9 deletions
dist/package.json
dist/src/index.js
package.json
src/index.js
dist/package.json
View file @
a2311c3
...
@@ -6,7 +6,6 @@
...
@@ -6,7 +6,6 @@
"scripts"
:
{
"scripts"
:
{
"test"
:
"echo
\"
Error: no test specified
\"
&& exit 1"
,
"test"
:
"echo
\"
Error: no test specified
\"
&& exit 1"
,
"build"
:
"babel index.js -D -d dist && babel src -D -d dist/src && babel ./.babelrc -D -d dist && babel ./package.json -D -d dist && echo '
\n
🍺 'Build success at `date '+%T %F'`"
"build"
:
"babel index.js -D -d dist && babel src -D -d dist/src && babel ./.babelrc -D -d dist && babel ./package.json -D -d dist && echo '
\n
🍺 'Build success at `date '+%T %F'`"
},
},
"devDependencies"
:
{
"devDependencies"
:
{
"@babel/cli"
:
"7.0.0-rc.1"
,
"@babel/cli"
:
"7.0.0-rc.1"
,
...
@@ -21,5 +20,8 @@
...
@@ -21,5 +20,8 @@
},
},
"keywords"
:
[],
"keywords"
:
[],
"author"
:
""
,
"author"
:
""
,
"license"
:
"ISC"
"license"
:
"ISC"
,
"dependencies"
:
{
"dotenv"
:
"^8.2.0"
}
}
}
dist/src/index.js
View file @
a2311c3
...
@@ -3,7 +3,11 @@
...
@@ -3,7 +3,11 @@
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
Object
.
defineProperty
(
exports
,
"__esModule"
,
{
value
:
true
value
:
true
});
});
exports
.
Utils
=
void
0
;
exports
.
ENV
=
exports
.
Utils
=
void
0
;
var
_dotenv
=
_interopRequireDefault
(
require
(
"dotenv"
));
function
_interopRequireDefault
(
obj
)
{
return
obj
&&
obj
.
__esModule
?
obj
:
{
default
:
obj
};
}
function
_classCallCheck
(
instance
,
Constructor
)
{
if
(
!
(
instance
instanceof
Constructor
))
{
throw
new
TypeError
(
"Cannot call a class as a function"
);
}
}
function
_classCallCheck
(
instance
,
Constructor
)
{
if
(
!
(
instance
instanceof
Constructor
))
{
throw
new
TypeError
(
"Cannot call a class as a function"
);
}
}
...
@@ -11,6 +15,8 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
...
@@ -11,6 +15,8 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
function
_createClass
(
Constructor
,
protoProps
,
staticProps
)
{
if
(
protoProps
)
_defineProperties
(
Constructor
.
prototype
,
protoProps
);
if
(
staticProps
)
_defineProperties
(
Constructor
,
staticProps
);
return
Constructor
;
}
function
_createClass
(
Constructor
,
protoProps
,
staticProps
)
{
if
(
protoProps
)
_defineProperties
(
Constructor
.
prototype
,
protoProps
);
if
(
staticProps
)
_defineProperties
(
Constructor
,
staticProps
);
return
Constructor
;
}
_dotenv
.
default
.
config
();
var
Utils
=
var
Utils
=
/*#__PURE__*/
/*#__PURE__*/
function
()
{
function
()
{
...
@@ -28,11 +34,15 @@ function () {
...
@@ -28,11 +34,15 @@ function () {
* @returns {String}
* @returns {String}
*/
*/
value
:
function
printf
(
str
)
{
value
:
function
printf
(
str
)
{
return
"=======>"
.
concat
(
str
,
"<======="
);
return
"=======>"
.
concat
(
str
,
"<======="
)
+
JSON
.
stringify
(
process
.
env
)
;
}
}
}]);
}]);
return
Utils
;
return
Utils
;
}();
}();
exports
.
Utils
=
Utils
;
exports
.
Utils
=
Utils
;
\ No newline at end of file
var
ENV
=
{
env
:
process
.
env
};
exports
.
ENV
=
ENV
;
\ No newline at end of file
package.json
View file @
a2311c3
...
@@ -6,7 +6,6 @@
...
@@ -6,7 +6,6 @@
"scripts"
:
{
"scripts"
:
{
"test"
:
"echo
\"
Error: no test specified
\"
&& exit 1"
,
"test"
:
"echo
\"
Error: no test specified
\"
&& exit 1"
,
"build"
:
"babel index.js -D -d dist && babel src -D -d dist/src && babel ./.babelrc -D -d dist && babel ./package.json -D -d dist && echo '
\n
🍺 'Build success at `date '+%T %F'`"
"build"
:
"babel index.js -D -d dist && babel src -D -d dist/src && babel ./.babelrc -D -d dist && babel ./package.json -D -d dist && echo '
\n
🍺 'Build success at `date '+%T %F'`"
},
},
"devDependencies"
:
{
"devDependencies"
:
{
"@babel/cli"
:
"7.0.0-rc.1"
,
"@babel/cli"
:
"7.0.0-rc.1"
,
...
@@ -21,5 +20,8 @@
...
@@ -21,5 +20,8 @@
},
},
"keywords"
:
[],
"keywords"
:
[],
"author"
:
""
,
"author"
:
""
,
"license"
:
"ISC"
"license"
:
"ISC"
,
"dependencies"
:
{
"dotenv"
:
"^8.2.0"
}
}
}
src/index.js
View file @
a2311c3
import
dotenv
from
'dotenv'
dotenv
.
config
();
export
class
Utils
{
export
class
Utils
{
/**
/**
* @function
* @function
...
@@ -7,6 +9,12 @@ export class Utils {
...
@@ -7,6 +9,12 @@ export class Utils {
* @returns {String}
* @returns {String}
*/
*/
static
printf
(
str
){
static
printf
(
str
){
return
`=======>
${
str
}
<=======`
;
return
`=======>
${
str
}
<=======`
+
JSON
.
stringify
(
process
.
env
)
;
}
}
}
export
const
ENV
=
{
env
:
process
.
env
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment