Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reorganizing files + Adding AtlMetric and Plumx. #1

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 43 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,44 @@
/.angular/cache
/__build__
/__server_build__
/node_modules
/typings
/tsd_typings/
npm-debug.log

/build/

/coverage

/dist/
/coverage/

.idea
*.iml
*.ngfactory.ts
*.css.shim.ts
*.scss.shim.ts

.DS_Store
assets/.DS_Store

webpack.records.json

/npm-debug.log.*

morgan.log

yarn-error.log

*.css

package-lock.json

.java-version

.env
/nbproject/

junit.xml

/src/mirador-viewer/config.local.js
yarn.lock
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Clone dspace-angular if is needed:
```
git clone -b dspace-7.6 [email protected]:DSpace/dspace-angular.git
```

Clone the template
```
git clone [email protected]:yorkulibraries/yorkspace-theme.git
```

Rename "dspace-angular/" with the folder name of your project (if applicable).
```
rsync -a --exclude=.git yorkspace-theme/ dspace-angular/
```

If the browser doesn't load the Altmetric or Plumx, add the following environment variables:
```
DSPACE_UI_ALTMETRIC=https://d1bxh8uas1mnw7.cloudfront.net/assets/embed.js
DSPACE_UI_PLUMX=https://cdn.plu.mx/widget-popup.js
```
296 changes: 296 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,296 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"dspace-angular": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
"style": "scss"
}
},
"root": "",
"sourceRoot": "src",
"prefix": "ds",
"architect": {
"build": {
"builder": "@angular-builders/custom-webpack:browser",
"options": {
"preserveSymlinks": true,
"customWebpackConfig": {
"path": "./webpack/webpack.browser.ts",
"mergeStrategies": {
"loaders": "prepend"
}
},
"allowedCommonJsDependencies": [
"cerialize",
"core-js",
"lodash",
"jwt-decode",
"uuid",
"webfontloader",
"zone.js"
],
"outputPath": "dist/browser",
"index": "src/index.html",
"main": "src/main.browser.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"aot": true,
"assets": [
"src/assets",
"src/robots.txt"
],
"styles": [
"src/styles/startup.scss",
{
"input": "src/styles/base-theme.scss",
"inject": false,
"bundleName": "base-theme"
},
{
"input": "src/themes/custom/styles/theme.scss",
"inject": false,
"bundleName": "custom-theme"
},
{
"input": "src/themes/dspace/styles/theme.scss",
"inject": false,
"bundleName": "dspace-theme"
},
{
"input": "src/themes/yorkspace/styles/theme.scss",
"inject": false,
"bundleName": "yorkspace-theme"
}
],
"scripts": [],
"baseHref": "/"
},
"configurations": {
"development": {
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
},
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.production.ts"
},
{
"replace": "src/config/store/devtools.ts",
"with": "src/config/store/devtools.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "3mb",
"maximumError": "5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "200kb",
"maximumError": "300kb"
}
]
}
}
},
"serve": {
"builder": "@angular-builders/custom-webpack:dev-server",
"options": {
"browserTarget": "dspace-angular:build",
"port": 4000
},
"configurations": {
"development": {
"browserTarget": "dspace-angular:build:development"
},
"production": {
"browserTarget": "dspace-angular:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "dspace-angular:build"
}
},
"test": {
"builder": "@angular-builders/custom-webpack:karma",
"options": {
"customWebpackConfig": {
"path": "./webpack/webpack.test.ts",
"mergeStrategies": {
"loaders": "prepend"
}
},
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"sourceMap": {
"scripts": false,
"styles": false,
"hidden": false,
"vendor": false
},
"assets": [
"src/assets"
],
"styles": [
{
"input": "src/styles/base-theme.scss",
"inject": false,
"bundleName": "base-theme"
}
],
"scripts": []
},
"configurations": {
"test": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.test.ts"
}
]
}
}
},
"e2e": {
"builder": "@cypress/schematic:cypress",
"options": {
"devServerTarget": "dspace-angular:serve",
"watch": true,
"headless": false
},
"configurations": {
"production": {
"devServerTarget": "dspace-angular:serve:production"
}
}
},
"server": {
"builder": "@angular-builders/custom-webpack:server",
"options": {
"customWebpackConfig": {
"path": "./webpack/webpack.prod.ts",
"mergeStrategies": {
"loaders": "prepend"
}
},
"outputPath": "dist/server",
"main": "server.ts",
"tsConfig": "tsconfig.server.json"
},
"configurations": {
"development": {
"sourceMap": true,
"optimization": false
},
"production": {
"sourceMap": false,
"optimization": true,
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.production.ts"
},
{
"replace": "src/config/store/devtools.ts",
"with": "src/config/store/devtools.prod.ts"
}
]
}
}
},
"serve-ssr": {
"builder": "@nguniversal/builders:ssr-dev-server",
"options": {
"browserTarget": "dspace-angular:build",
"serverTarget": "dspace-angular:server",
"port": 4000
},
"configurations": {
"production": {
"browserTarget": "dspace-angular:build:production",
"serverTarget": "dspace-angular:server:production"
}
}
},
"prerender": {
"builder": "@nguniversal/builders:prerender",
"options": {
"browserTarget": "dspace-angular:build:production",
"serverTarget": "dspace-angular:server:production",
"routes": [
"/"
]
},
"configurations": {
"production": {}
}
},
"cypress-run": {
"builder": "@cypress/schematic:cypress",
"options": {
"devServerTarget": "dspace-angular:serve"
},
"configurations": {
"production": {
"devServerTarget": "dspace-angular:serve:production"
}
}
},
"cypress-open": {
"builder": "@cypress/schematic:cypress",
"options": {
"watch": true,
"headless": false
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"src/**/*.ts",
"src/**/*.html",
"src/**/*.json5"
]
}
}
}
}
},
"cli": {
"analytics": false,
"schematicCollections": [
"@angular-eslint/schematics"
]
},
"schematics": {
"@angular-eslint/schematics:application": {
"setParserOptionsProject": true
},
"@angular-eslint/schematics:library": {
"setParserOptionsProject": true
}
}
}
Loading