Skip to content

Commit

Permalink
Merge pull request #12820 from primefaces/ssr
Browse files Browse the repository at this point in the history
Enhancements and refactor for Angular Universal Support
  • Loading branch information
cetincakiroglu authored Mar 29, 2023
2 parents 1a3cac1 + ac7af4a commit 8b05d64
Show file tree
Hide file tree
Showing 129 changed files with 36,827 additions and 5,396 deletions.
Empty file modified .browserslistrc
100755 → 100644
Empty file.
151 changes: 87 additions & 64 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
"newProjectRoot": "projects",
"projects": {
"primeng-library": {
"root": "src",
"projectType": "library",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
"project": "src/app/components/ng-package.json",
"tsConfig": "src/app/components/tsconfig.lib.prod.json"
"root": "src",
"projectType": "library",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
"project": "src/app/components/ng-package.json",
"tsConfig": "src/app/components/tsconfig.lib.prod.json"
}
}
}
}
},
},
"primeng": {
"projectType": "application",
"schematics": {
Expand All @@ -30,29 +30,31 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/primeng",
"outputPath": "dist/primeng/browser",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"polyfills": [
"zone.js"
],
"tsConfig": "tsconfig.app.json",
"aot": true,
"inlineStyleLanguage": "scss",
"assets": [
"src/favicon.png",
"src/assets"
"src/assets",
"src/showcase",
"src/upload.php",
"src/versions.json",
"src/.htaccess"
],
"styles": [
"src/styles.scss"
"src/styles.scss",
"node_modules/primeicons/primeicons.css"
],
"scripts": [
"./node_modules/prismjs/prism.js",
"./node_modules/prismjs/components/prism-typescript.js",
"./node_modules/prismjs/components/prism-scss.js",
"./node_modules/prismjs/components/prism-bash.js"
"./node_modules/prismjs/prism.js",
"./node_modules/prismjs/components/prism-typescript.js"
],
"allowedCommonJsDependencies": [
"@fullcalendar/timegrid",
"@fullcalendar/interaction",
"@fullcalendar/daygrid",
"chart.js",
"xlsx",
"jspdf-autotable",
Expand All @@ -66,33 +68,14 @@
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": {
"scripts": true,
"styles": {
"minify": true,
"inlineCritical": false
},
"fonts": true
},
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
}
]
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
}
],
"outputHashing": "all"
},
"development": {
"buildOptimizer": false,
Expand Down Expand Up @@ -132,7 +115,8 @@
"karmaConfig": "karma.conf.js",
"assets": [
"src/favicon.png",
"src/assets"
"src/assets",
"src/upload.php"
],
"styles": [
"src/styles.scss",
Expand All @@ -141,23 +125,62 @@
"scripts": []
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"server": {
"builder": "@angular-devkit/build-angular:server",
"options": {
"lintFilePatterns": [
"src/**/*.ts",
"src/**/*.html"
"outputPath": "dist/primeng/server",
"main": "server.ts",
"tsConfig": "tsconfig.server.json",
"inlineStyleLanguage": "scss"
},
"configurations": {
"production": {
"outputHashing": "media"
},
"development": {
"optimization": false,
"sourceMap": true,
"extractLicenses": false,
"vendorChunk": true
}
},
"defaultConfiguration": "production"
},
"serve-ssr": {
"builder": "@nguniversal/builders:ssr-dev-server",
"configurations": {
"development": {
"browserTarget": "primeng:build:development",
"serverTarget": "primeng:server:development"
},
"production": {
"browserTarget": "primeng:build:production",
"serverTarget": "primeng:server:production"
}
},
"defaultConfiguration": "development"
},
"prerender": {
"builder": "@nguniversal/builders:prerender",
"options": {
"routes": [
"/"
]
}
},
"configurations": {
"production": {
"browserTarget": "primeng:build:production",
"serverTarget": "primeng:server:production"
},
"development": {
"browserTarget": "primeng:build:development",
"serverTarget": "primeng:server:development"
}
},
"defaultConfiguration": "production"
}
}
}
},
"defaultProject": "primeng",
"cli": {
"analytics": false,
"schematicCollections": [
"@angular-eslint/schematics"
]
}
}
}

4 changes: 4 additions & 0 deletions api/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/* eslint-env es6 */
const server = require('../dist/primeng/server/main');

module.exports = server.app();
Loading

1 comment on commit 8b05d64

@vercel
Copy link

@vercel vercel bot commented on 8b05d64 Mar 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.