mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 10:19:35 +02:00
Update webpack stack
This commit is contained in:
parent
8635a2c70c
commit
1840c2f7c9
32 changed files with 424 additions and 77 deletions
22
server/helpers/core-utils.ts
Normal file
22
server/helpers/core-utils.ts
Normal file
|
@ -0,0 +1,22 @@
|
|||
/*
|
||||
Different from 'utils' because we don't not import other PeerTube modules.
|
||||
Useful to avoid circular dependencies.
|
||||
*/
|
||||
|
||||
import { join } from 'path'
|
||||
|
||||
function isTestInstance () {
|
||||
return process.env.NODE_ENV === 'test'
|
||||
}
|
||||
|
||||
function root () {
|
||||
// We are in /dist/helpers/utils.js
|
||||
return join(__dirname, '..', '..', '..')
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export {
|
||||
isTestInstance,
|
||||
root
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue