Skip to content

Commit

Permalink
Revert changes of "New builder" (#200)
Browse files Browse the repository at this point in the history
  • Loading branch information
A77AY authored Nov 22, 2024
1 parent bc08270 commit 0bfabda
Show file tree
Hide file tree
Showing 20 changed files with 2,810 additions and 2,595 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
registry-access-token: ${{ secrets.GITHUB_TOKEN }}
- name: set config
run: |
printf "$APP_ENV_FILE" > dist/browser/assets/appConfig.json
printf "$AUTH_ENV_FILE" > dist/browser/assets/authConfig.json
echo $FAVICO | base64 -d > dist/browser/favicon.ico
printf "$LOGO" > dist/browser/assets/icons/logo.svg
printf "$APP_ENV_FILE" > dist/appConfig.json
printf "$AUTH_ENV_FILE" > dist/authConfig.json
echo $FAVICO | base64 -d > dist/favicon.ico
printf "$LOGO" > dist/assets/icons/logo.svg
env:
APP_ENV_FILE: ${{secrets.APP_CONFIG_CF}}
AUTH_ENV_FILE: ${{secrets.AUTH_CONFIG_CF}}
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,5 @@ Thumbs.db

# Env and configs
.env*
src/assets/*Config*.json
!src/assets/_*Config*.json
src/*Config*.json
!src/_*Config*.json
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
1. Add environment and configurations:

- `src/.env`
- `src/assets/appConfig.json`
- `src/assets/authConfig.json`
- `src/appConfig.json`
- `src/authConfig.json`

You can copy from examples like this one: [`_appConfig.json`](./src/assets/_appConfig.json)
You can copy from examples like this one: [`_appConfig.json`](./src/_appConfig.json)

2. Install packages
```sh
Expand Down Expand Up @@ -47,5 +47,5 @@ You can copy from examples like this one: [`_appConfig.json`](./src/assets/_appC

```sh
npm run build -- --prod --stats-json --extraWebpackConfig webpack.extra.js
npx webpack-bundle-analyzer dist/browser/stats.json
npx webpack-bundle-analyzer dist/stats.json
```
2 changes: 1 addition & 1 deletion _.env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
PROXY_TARGET="vality.dev"
PROXY_TARGET="https://vality.dev"
77 changes: 58 additions & 19 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,48 @@
"schematics": {
"@schematics/angular:component": {
"style": "scss"
},
"@schematics/angular:application": {
"strict": true
}
},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:application",
"builder": "@angular-builders/custom-webpack:browser",
"options": {
"customWebpackConfig": {
"path": "./extra-webpack.config.ts"
},
"allowedCommonJsDependencies": [
"uuid",
"keycloak-js",
"css-element-queries",
"humanize-duration",
"apexcharts",
"short-uuid",
"moment",
"flat",
"base64-js",
"js-sha256",
"utility-types"
],
"outputPath": "dist",
"index": "src/index.html",
"browser": "src/main.ts",
"main": "src/main.ts",
"polyfills": ["zone.js"],
"tsConfig": "tsconfig.app.json",
"inlineStyleLanguage": "scss",
"assets": ["src/favicon.ico", "src/assets"],
"assets": [
"src/favicon.ico",
"src/assets",
"src/appConfig.json",
"src/authConfig.json",
"src/appConfig.stage.json",
"src/authConfig.stage.json"
],
"styles": [
"src/styles/core.scss",
{
Expand Down Expand Up @@ -54,13 +80,13 @@
"budgets": [
{
"type": "initial",
"maximumWarning": "2MB",
"maximumError": "5MB"
"maximumWarning": "2mb",
"maximumError": "5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "2kB",
"maximumError": "4kB"
"maximumWarning": "6kb",
"maximumError": "10kb"
}
],
"fileReplacements": [
Expand All @@ -69,12 +95,16 @@
"with": "src/environments/environment.prod.ts"
}
],
"outputHashing": "all"
"outputHashing": "all",
"sourceMap": true
},
"development": {
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true
"sourceMap": true,
"namedChunks": true
},
"stage": {
"fileReplacements": [
Expand All @@ -88,7 +118,7 @@
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"builder": "@angular-builders/custom-webpack:dev-server",
"configurations": {
"production": {
"buildTarget": "dashboard:build:production"
Expand All @@ -102,16 +132,22 @@
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n"
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"builder": "@angular-builders/custom-webpack:karma",
"options": {
"polyfills": ["zone.js", "zone.js/testing"],
"main": "src/test.ts",
"polyfills": ["zone.js"],
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"inlineStyleLanguage": "scss",
"assets": ["src/favicon.ico", "src/assets"],
"assets": [
"src/favicon.ico",
"src/assets",
"src/appConfig.json",
"src/authConfig.json",
"src/appConfig.stage.json",
"src/authConfig.stage.json"
],
"styles": [
"src/styles/core.scss",
{
Expand All @@ -134,8 +170,12 @@
"bundleName": "eastern-theme",
"inject": false
}
],
"scripts": []
]
},
"configurations": {
"ci": {
"karmaConfig": "karma-ci.conf.js"
}
}
},
"lint": {
Expand All @@ -148,7 +188,6 @@
}
},
"cli": {
"schematicCollections": ["@angular-eslint/schematics"],
"analytics": false
}
}
10 changes: 10 additions & 0 deletions extra-webpack.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { IgnorePlugin, Configuration } from 'webpack';

export default {
plugins: [
new IgnorePlugin({
resourceRegExp: /^\.\/locale$/,
contextRegExp: /moment$/,
}),
],
} as Configuration;
Loading

0 comments on commit 0bfabda

Please sign in to comment.