forked from DSpace/dspace-angular
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged in DSC-648-alignment-with-7.3 (pull request DSpace#328)
alignment with DSpace 7.3
- Loading branch information
Showing
957 changed files
with
25,225 additions
and
15,025 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,3 +37,5 @@ package-lock.json | |
|
||
.env | ||
/nbproject/ | ||
|
||
junit.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import * as fs from 'fs'; | ||
import { join } from 'path'; | ||
|
||
import { AppConfig } from '../src/config/app-config.interface'; | ||
import { buildAppConfig } from '../src/config/config.server'; | ||
|
||
/** | ||
* Script to set baseHref as `ui.nameSpace` for development mode. Adds `baseHref` to angular.json build options. | ||
* | ||
* Usage (see package.json): | ||
* | ||
* yarn base-href | ||
*/ | ||
|
||
const appConfig: AppConfig = buildAppConfig(); | ||
|
||
const angularJsonPath = join(process.cwd(), 'angular.json'); | ||
|
||
if (!fs.existsSync(angularJsonPath)) { | ||
console.error(`Error:\n${angularJsonPath} does not exist\n`); | ||
process.exit(1); | ||
} | ||
|
||
try { | ||
const angularJson = require(angularJsonPath); | ||
|
||
const baseHref = `${appConfig.ui.nameSpace}${appConfig.ui.nameSpace.endsWith('/') ? '' : '/'}`; | ||
|
||
console.log(`Setting baseHref to ${baseHref} in angular.json`); | ||
|
||
angularJson.projects['dspace-angular'].architect.build.options.baseHref = baseHref; | ||
|
||
fs.writeFileSync(angularJsonPath, JSON.stringify(angularJson, null, 2) + '\n'); | ||
} catch (e) { | ||
console.error(e); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.