File tree Expand file tree Collapse file tree 10 files changed +238
-16
lines changed
Expand file tree Collapse file tree 10 files changed +238
-16
lines changed Original file line number Diff line number Diff line change 3535 - name : Test
3636 run : npm run test
3737
38+ - name : Build
39+ run : npm run build
40+
3841 - name : Run Code Coverage
3942 uses : codecov/codecov-action@v5
4043 with :
Original file line number Diff line number Diff line change @@ -13,6 +13,19 @@ precommit:
1313requirements :
1414 npm ci
1515
16+ clean :
17+ rm -rf dist
18+
19+ build : clean
20+ tsc --project tsconfig.build.json
21+ tsc-alias -p tsconfig.build.json
22+ find src -type f -name ' *.scss' -exec sh -c ' \
23+ for f in " $$ @" ; do \
24+ d=" dist/$$ {f#src/}" ; \
25+ mkdir -p " $$ (dirname " $$ d" )" ; \
26+ cp " $$ f" " $$ d" ; \
27+ done' sh {} +
28+
1629i18n.extract :
1730 # Pulling display strings from .jsx files into .json files...
1831 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 99 "type" : " git" ,
1010 "url" : " git+https://github.com/openedx/frontend-app-authn.git"
1111 },
12- "main" : " src/index.ts" ,
12+ "exports" : {
13+ "." : " ./dist/index.js" ,
14+ "./app.scss" : " ./dist/app.scss"
15+ },
1316 "files" : [
14- " /src "
17+ " /dist "
1518 ],
1619 "browserslist" : [
1720 " extends @edx/browserslist-config"
2124 " *.scss"
2225 ],
2326 "scripts" : {
27+ "build" : " make build" ,
28+ "clean" : " make clean" ,
2429 "dev" : " PORT=1999 PUBLIC_PATH=/authn openedx dev" ,
2530 "i18n_extract" : " openedx formatjs extract" ,
2631 "lint" : " openedx lint ." ,
2732 "lint:fix" : " openedx lint --fix ." ,
2833 "snapshot" : " openedx test --updateSnapshot" ,
34+ "prepublishOnly" : " npm run build" ,
2935 "test" : " openedx test --coverage --passWithNoTests"
3036 },
3137 "author" : " Open edX" ,
6874 "eslint-plugin-import" : " 2.31.0" ,
6975 "jest" : " ^29.7.0" ,
7076 "react-test-renderer" : " ^18.3.1" ,
71- "ts-jest" : " ^29.4.0"
77+ "ts-jest" : " ^29.4.0" ,
78+ "tsc-alias" : " ^1.8.16"
7279 },
7380 "peerDependencies" : {
74- "@openedx/frontend-base" : " ^1.0.0-alpha.8 " ,
81+ "@openedx/frontend-base" : " ^1.0.0-alpha.12 " ,
7582 "@openedx/paragon" : " ^23" ,
7683 "react" : " ^18" ,
7784 "react-dom" : " ^18" ,
Original file line number Diff line number Diff line change 11@use " @openedx/frontend-base/shell/app.scss" ;
2- @use " sass/style" ;
2+ @use " ./ sass/style" ;
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" : " ." ,
55 "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