File tree Expand file tree Collapse file tree 9 files changed +413
-1200
lines changed
Expand file tree Collapse file tree 9 files changed +413
-1200
lines changed 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+ "." : " ./dist/index.js" ,
11+ "./app.scss" : " ./dist/app.scss"
12+ },
1013 "files" : [
11- " /src "
14+ " /dist "
1215 ],
1316 "browserslist" : [
1417 " extends @edx/browserslist-config"
1821 " *.scss"
1922 ],
2023 "scripts" : {
24+ "build" : " make build" ,
25+ "clean" : " make clean" ,
2126 "dev" : " PORT=1996 PUBLIC_PATH=/learner-dashboard openedx dev" ,
2227 "i18n_extract" : " openedx formatjs extract" ,
2328 "lint" : " openedx lint ." ,
2429 "lint:fix" : " openedx lint --fix ." ,
30+ "prepack" : " npm run build" ,
2531 "test" : " openedx test --coverage --passWithNoTests"
2632 },
2733 "author" : " Open edX" ,
6571 "jest-when" : " ^3.6.0" ,
6672 "react-dev-utils" : " ^12.0.0" ,
6773 "react-test-renderer" : " ^18.3.1" ,
68- "redux-mock-store" : " ^1.5.4"
74+ "redux-mock-store" : " ^1.5.4" ,
75+ "tsc-alias" : " ^1.8.16"
6976 },
7077 "peerDependencies" : {
71- "@openedx/frontend-base" : " ^1.0.0-alpha.11 " ,
78+ "@openedx/frontend-base" : " ^1.0.0-alpha.12 " ,
7279 "@openedx/paragon" : " ^23" ,
7380 "@tanstack/react-query" : " ^5" ,
7481 "@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+ "paths" : {
7+ "@src/*" : [" ./src/*" ]
8+ },
69 },
710 "include" : [
811 " src/**/*" ,
You can’t perform that action at this time.
0 commit comments