File tree 3 files changed +105
-3
lines changed 3 files changed +105
-3
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ // These tasks will run in order when initializing your CodeSandbox project.
3
+ "setupTasks" : [
4
+ {
5
+ "name" : " Install pnpm 9" ,
6
+ "command" : " npm i -g pnpm@9"
7
+ },
8
+ {
9
+ "name" : " Install dependencies" ,
10
+ "command" : " pnpm install --frozen-lockfile"
11
+ },
12
+ {
13
+ "name" : " Install Chrome" ,
14
+ "command" : " export CHROME_BIN=$(./packages/tests/node_modules/.bin/puppeteer browsers install chrome@115 | cut -d' ' -f2)"
15
+ }
16
+ ],
17
+
18
+ // These tasks can be run from CodeSandbox. Running one will open a log in the app.
19
+ "tasks" : {
20
+ "start" : {
21
+ "name" : " start" ,
22
+ "command" : " pnpm start" ,
23
+ "runAtStart" : true ,
24
+ "preview" : {
25
+ "port" : 3001
26
+ }
27
+ },
28
+ "test" : {
29
+ "name" : " test" ,
30
+ "command" : " pnpm test"
31
+ },
32
+ "test-dev" : {
33
+ "name" : " test-dev" ,
34
+ "command" : " pnpm test-dev"
35
+ },
36
+ "lint" : {
37
+ "name" : " lint" ,
38
+ "command" : " pnpm lint"
39
+ },
40
+ "lint-fix" : {
41
+ "name" : " lint-fix" ,
42
+ "command" : " pnpm lint-fix"
43
+ },
44
+ "build" : {
45
+ "name" : " build" ,
46
+ "command" : " pnpm build"
47
+ },
48
+ "build-examples" : {
49
+ "name" : " build-examples" ,
50
+ "command" : " pnpm build-examples"
51
+ },
52
+ "build-libs" : {
53
+ "name" : " build-libs" ,
54
+ "command" : " pnpm build-libs"
55
+ },
56
+ "sandbox-js" : {
57
+ "name" : " sandbox-js" ,
58
+ "command" : " pnpm sandbox-js" ,
59
+ "preview" : {
60
+ "port" : 5174
61
+ }
62
+ },
63
+ "sandbox-next" : {
64
+ "name" : " sandbox-next" ,
65
+ "command" : " pnpm sandbox-next" ,
66
+ "preview" : {
67
+ "port" : 3002
68
+ }
69
+ },
70
+ "sandbox-ts" : {
71
+ "name" : " sandbox-ts" ,
72
+ "command" : " pnpm sandbox-ts" ,
73
+ "preview" : {
74
+ "port" : 5175
75
+ }
76
+ },
77
+ "clean" : {
78
+ "name" : " clean" ,
79
+ "command" : " pnpm clean"
80
+ },
81
+ "smoke" : {
82
+ "name" : " smoke" ,
83
+ "command" : " pnpm smoke"
84
+ },
85
+ "resmoke" : {
86
+ "name" : " resmoke" ,
87
+ "command" : " pnpm resmoke"
88
+ }
89
+ }
90
+ }
Original file line number Diff line number Diff line change 16
16
"eslint" : " eslint --ext .jsx --ext .js --ext .tsx --ext .ts ./specs/ ./support/" ,
17
17
"lint" : " npm run eslint && npm run tsc" ,
18
18
"lint-fix" : " eslint --ext .jsx --ext .js --ext .tsx --ext .ts --fix ./specs/ ./support/" ,
19
- "test" : " karma start ./karma.conf.js" ,
20
- "test-debug" : " TEST_WATCH=1 TEST_DEBUG=1 karma start ./karma.conf.js --debug" ,
21
- "test-dev" : " TEST_WATCH=1 karma start ./karma.conf.js" ,
19
+ "test" : " . ./scripts/install-chrome.sh && karma start ./karma.conf.js" ,
20
+ "test-debug" : " . ./scripts/install-chrome.sh && TEST_WATCH=1 TEST_DEBUG=1 karma start ./karma.conf.js --debug" ,
21
+ "test-dev" : " . ./scripts/install-chrome.sh && TEST_WATCH=1 karma start ./karma.conf.js" ,
22
22
"tsc" : " tsc -p . --noEmit"
23
23
},
24
24
"dependencies" : {
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ if [ " $CSB " = " true" ]; then
4
+ echo " CHROME_BIN=$CHROME_BIN "
5
+ PUPPETEER_VERSION=$( ./node_modules/.bin/puppeteer --version)
6
+ echo " puppeteer version: $PUPPETEER_VERSION "
7
+ INSTALL_RES=$( ./node_modules/.bin/puppeteer browsers install chrome@115)
8
+ echo " install result: $INSTALL_RES "
9
+ INSTALL_PATH=$( echo $INSTALL_RES | cut -d' ' -f2)
10
+ echo " install path: $INSTALL_PATH "
11
+ export CHROME_BIN=" $INSTALL_PATH "
12
+ fi
You can’t perform that action at this time.
0 commit comments