Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
evilaliv3 committed May 16, 2024
1 parent 6e15268 commit 1027109
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 46 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/scripts/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ trap atexit EXIT
setupClient() {
cd $GITHUB_WORKSPACE/client # to install frontend dependencies
npm install -d
./node_modules/grunt/bin/grunt test_build
./node_modules/grunt/bin/grunt build_and_instrument
}

setupBackend() {
Expand Down
25 changes: 7 additions & 18 deletions client/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -415,20 +415,11 @@ module.exports = function(grunt) {
},

shell: {
build: {
command: "npx ng build --configuration=production --aot && echo \"Build completed\""
npx_build: {
command: "npx ng build --configuration=production --aot"
},
test: {
npx_build_and_instrument: {
command: "npx ng build --configuration=testing --source-map && nyc instrument dist instrument"
},
babel: {
command: "npx ng build --configuration=production --source-map && nyc instrument dist instrument"
},
serve: {
command: "ng serve --proxy-config proxy.conf.json"
},
code_coverage: {
command: "npm run e2e:ci && npm run e2e:coverage"
}
},
});
Expand All @@ -437,10 +428,10 @@ module.exports = function(grunt) {
grunt.loadNpmTasks("grunt-contrib-clean");
grunt.loadNpmTasks("grunt-contrib-concat");
grunt.loadNpmTasks("grunt-contrib-copy");
grunt.loadNpmTasks("grunt-shell");
grunt.loadNpmTasks("grunt-stylelint");
grunt.loadNpmTasks("grunt-string-replace");
grunt.loadNpmTasks("gruntify-eslint");
grunt.loadNpmTasks("grunt-shell");

let readNoTranslateStrings = function() {
return JSON.parse(grunt.file.read("app/assets/data_src/notranslate_strings.json"));
Expand Down Expand Up @@ -1021,9 +1012,7 @@ module.exports = function(grunt) {
// Run this task to fetch translations from transifex and create application files
grunt.registerTask("updateTranslations", ["fetchTranslations", "makeAppData", "verifyAppData"]);

grunt.registerTask("build", ["clean", "concat:fontsource", "concat:fontawesome", "string-replace:initFonts", "copy:sources", "shell:build", "copy:build", "string-replace", "copy:package", "clean:tmp"]);

grunt.registerTask("serve", ["shell:serve"]);

grunt.registerTask("coverage", ["shell:code_coverage"]);
grunt.registerTask("build", ["clean", "concat:fontsource", "concat:fontawesome", "string-replace:initFonts", "copy:sources", "shell:npx_build", "copy:build", "string-replace", "copy:package", "clean:tmp"]);

grunt.registerTask("build_and_instrument", ["clean", "concat:fontsource", "concat:fontawesome", "string-replace:initFonts", "copy:sources", "shell:npx_build_and_instrument", "copy:build", "string-replace", "copy:package", "clean:tmp"]);
};
30 changes: 30 additions & 0 deletions client/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,36 @@
"customWebpackConfig": {
"path": "./build.config.ts"
}
},
"development": {
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
},
"testing": {
"extractLicenses": false,
"vendorChunk": true,
"customWebpackConfig": {
"path": "./cypress/test.config.ts"
},
"styles": [
"app/css/components/switch.css",
"app/css/components/select.css",
"app/css/components/date-picker.css",
"app/css/main.css",
"app/css/components/loader.css",
"app/css/components/button.css",
"app/css/components/ng-select.css",
"app/css/bootstrap-fixes.css",
"node_modules/ng-multiselect-dropdown/themes/ng-multiselect-dropdown.theme.scss",
"node_modules/@ng-select/ng-select/themes/default.theme.css",
"node_modules/@fortawesome/fontawesome-free/css/fontawesome.css",
"app/assets/lib/webfonts/@fontawesome/fontawesome-all.css",
"app/assets/lib/webfonts/@fontsource/fontsource-all.css",
"app/css/test.css"
]
}
},
"defaultConfiguration": "production"
Expand Down
50 changes: 23 additions & 27 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,20 @@
},
"private": true,
"dependencies": {
"@angular-builders/custom-webpack": "17.0.2",
"@angular-devkit/architect": "0.1703.7",
"@angular/animations": "17.3.9",
"@angular/common": "17.3.9",
"@angular/compiler": "17.3.9",
"@angular/compiler-cli": "17.3.0",
"@angular/core": "17.3.9",
"@angular/forms": "17.3.9",
"@angular/localize": "17.3.9",
"@angular/platform-browser": "17.3.9",
"@angular/platform-browser-dynamic": "17.3.9",
"@angular/router": "17.3.9",
"@cypress/code-coverage": "3.12.39",
"@cypress/schematic": "2.5.1",
"@flowjs/flow.js": "2.14.1",
"@flowjs/ngx-flow": "0.8.1",
"@fontsource/inter": "5.0.18",
Expand All @@ -36,62 +41,53 @@
"@fontsource/noto-sans-thai": "5.0.14",
"@fontsource/noto-serif-tibetan": "5.0.13",
"@fortawesome/fontawesome-free": "6.5.2",
"@istanbuljs/nyc-config-typescript": "1.0.2",
"@jsdevtools/coverage-istanbul-loader": "3.0.5",
"@ng-bootstrap/ng-bootstrap": "16.0.0",
"@ng-idle/core": "14.0.0",
"@ng-idle/keepalive": "14.0.0",
"@ng-select/ng-select": "12.0.7",
"@ngx-translate/core": "15.0.0",
"@ngx-translate/http-loader": "8.0.0",
"@popperjs/core": "2.11.8",
"@types/angular": "1.8.9",
"@types/flowjs__flow.js": "2.13.3",
"@types/lodash": "4.17.0",
"@types/marked": "6.0.0",
"@types/qrcode": "1.5.5",
"@typescript-eslint/eslint-plugin": "7.9.0",
"angularx-qrcode": "17.0.1",
"bootstrap": "5.3.3",
"chart.js": "4.4.2",
"cypress": "13.9.0",
"gettext-parser": "7.0.1",
"grunt": "1.6.1",
"grunt-confirm": "1.0.8",
"grunt-contrib-clean": "2.0.1",
"grunt-contrib-concat": "2.1.0",
"grunt-contrib-copy": "1.0.0",
"grunt-shell": "4.0.0",
"grunt-string-replace": "1.3.3",
"grunt-stylelint": "0.20.0",
"gruntify-eslint": "5.0.0",
"load-grunt-tasks": "5.1.0",
"lodash": "4.17.21",
"marked": "12.0.2",
"ng-multiselect-dropdown": "1.0.0",
"ng2-charts": "6.0.1",
"ng2-select": "2.0.0",
"ngx-clipboard": "^16.0.0",
"ngx-markdown": "17.2.1",
"ngx-order-pipe": "2.2.0",
"node-gettext": "3.0.0",
"npm-check-updates": "^16.14.20",
"npm-check-updates": "16.14.20",
"nyc": "15.1.0",
"rxjs": "7.8.1",
"stylelint": "16.5.0",
"stylelint-config-standard": "36.0.0",
"superagent": "9.0.2",
"ts-node": "10.9.2",
"tslib": "2.6.2",
"typescript": "5.4.5",
"webpack-dev-server": "5.0.4",
"zone.js": "0.14.5"
},
"devDependencies": {
"@angular-builders/custom-webpack": "17.0.2",
"@angular-devkit/architect": "0.1703.7",
"@angular-devkit/build-angular": "17.3.7",
"@angular-devkit/core": "17.3.7",
"@angular/cli": "17.3.7",
"@angular/compiler-cli": "17.3.9",
"@cypress/code-coverage": "3.12.39",
"@cypress/schematic": "2.5.1",
"@istanbuljs/nyc-config-typescript": "1.0.2",
"@types/angular": "1.8.9",
"@types/flowjs__flow.js": "2.13.3",
"@types/lodash": "4.17.1",
"@typescript-eslint/eslint-plugin": "7.9.0",
"cypress": "13.9.0",
"grunt": "1.6.1",
"grunt-contrib-concat": "2.1.0",
"grunt-stylelint": "0.20.0",
"nyc": "15.1.0",
"stylelint": "16.5.0",
"stylelint-config-standard": "36.0.0",
"ts-node": "10.9.2",
"webpack-dev-server": "^5.0.4"
}
}

0 comments on commit 1027109

Please sign in to comment.