File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3333 - name : Test
3434 run : npm run test
3535
36+ - name : Build
37+ run : npm run build
38+
3639 - name : Run Coverage
3740 uses : codecov/codecov-action@v5
3841 with :
Original file line number Diff line number Diff line change @@ -24,6 +24,19 @@ test.npm.%: validate-no-uncommitted-package-lock-changes
2424requirements : # # install ci requirements
2525 npm ci
2626
27+ clean :
28+ rm -rf dist
29+
30+ build : clean
31+ tsc --project tsconfig.build.json
32+ tsc-alias -p tsconfig.build.json
33+ find src -type f \( -name ' *.scss' -o -name ' *.png' -o -name ' *.svg' \) -exec sh -c ' \
34+ for f in " $$ @" ; do \
35+ d=" dist/$$ {f#src/}" ; \
36+ mkdir -p " $$ (dirname " $$ d" )" ; \
37+ cp " $$ f" " $$ d" ; \
38+ done' sh {} +
39+
2740i18n.extract :
2841 # Pulling display strings from .jsx files into .json files...
2942 rm -rf $(transifex_temp )
Original file line number Diff line number Diff line change 1- const { createConfig } = require ( '@openedx/frontend-base/config ' ) ;
1+ const { createConfig } = require ( '@openedx/frontend-base/tools ' ) ;
22
33module . exports = createConfig ( 'babel' ) ;
Original file line number Diff line number Diff line change 11// @ts -check
22
3- const { createLintConfig } = require ( '@openedx/frontend-base/config ' ) ;
3+ const { createLintConfig } = require ( '@openedx/frontend-base/tools ' ) ;
44
55module . exports = createLintConfig (
66 {
Original file line number Diff line number Diff line change 1- const { createConfig } = require ( '@openedx/frontend-base/config ' ) ;
1+ const { createConfig } = require ( '@openedx/frontend-base/tools ' ) ;
22
33module . exports = createConfig ( 'test' , {
44 setupFilesAfterEnv : [
Original file line number Diff line number Diff line change 66 "type" : " git" ,
77 "url" : " git+https://github.com/edx/frontend-app-learner-dashboard.git"
88 },
9- "main" : " src/index.ts" ,
9+ "exports" : {
10+ "." : {
11+ "types" : " ./dist/index.d.ts" ,
12+ "import" : " ./dist/index.js" ,
13+ "default" : " ./dist/index.js"
14+ },
15+ "./app.scss" : " ./dist/app.scss"
16+ },
1017 "files" : [
11- " /src "
18+ " /dist "
1219 ],
1320 "browserslist" : [
1421 " extends @edx/browserslist-config"
1825 " *.scss"
1926 ],
2027 "scripts" : {
28+ "build" : " make build" ,
29+ "clean" : " make clean" ,
2130 "dev" : " PORT=1996 PUBLIC_PATH=/learner-dashboard openedx dev" ,
2231 "i18n_extract" : " openedx formatjs extract" ,
2332 "lint" : " openedx lint ." ,
6574 "jest-when" : " ^3.6.0" ,
6675 "react-dev-utils" : " ^12.0.0" ,
6776 "react-test-renderer" : " ^18.3.1" ,
68- "redux-mock-store" : " ^1.5.4"
77+ "redux-mock-store" : " ^1.5.4" ,
78+ "tsc-alias" : " ^1.8.16"
6979 },
7080 "peerDependencies" : {
71- "@openedx/frontend-base" : " ^1.0.0-alpha.11 " ,
81+ "@openedx/frontend-base" : " file:../frontend-base/pack/openedx-frontend-base.tgz " ,
7282 "@openedx/paragon" : " ^23" ,
7383 "@tanstack/react-query" : " ^5" ,
7484 "@types/react" : " ^18" ,
Original file line number Diff line number Diff line change 1+ {
2+ "extends" : " ./tsconfig.json" ,
3+ "compilerOptions" : {
4+ "rootDir" : " src" ,
5+ "outDir" : " dist" ,
6+ "noEmit" : false
7+ },
8+ "include" : [
9+ " src/**/*"
10+ ],
11+ "exclude" : [
12+ " src/**/*.test.*" ,
13+ " src/**/*.spec.*" ,
14+ " src/**/tests/**/*" ,
15+ " src/__mocks__/**/*" ,
16+ " src/setupTest.*"
17+ ]
18+ }
Original file line number Diff line number Diff line change 11{
2- "extends" : " @openedx/frontend-base/config /tsconfig.json" ,
2+ "extends" : " @openedx/frontend-base/tools /tsconfig.json" ,
33 "compilerOptions" : {
44 "rootDir" : " ." ,
5- "outDir" : " dist"
5+ "outDir" : " dist" ,
6+ "baseUrl" : " ." ,
7+ "paths" : {
8+ "@src/*" : [" ./src/*" ]
9+ },
610 },
711 "include" : [
812 " src/**/*" ,
You can’t perform that action at this time.
0 commit comments