File tree Expand file tree Collapse file tree 7 files changed +96
-178
lines changed Expand file tree Collapse file tree 7 files changed +96
-178
lines changed Original file line number Diff line number Diff line change @@ -83,12 +83,22 @@ api/docs/dist/v2/
83
83
*.sublime-workspace
84
84
85
85
# build artifacts
86
+ api-client/dist/
86
87
app/dist/
87
88
app-shell/dist/
88
89
app-shell-odd/dist/
89
90
components/lib
90
91
discovery-client/lib
91
92
labware-designer/dist/
92
93
labware-library/dist/
94
+ opentrons-ai-client/dist/
93
95
protocol-designer/dist/
94
- opentrons-ai-client/dist/
96
+ react-api-client/dist/
97
+ shared-data/lib/
98
+ step-generation/lib/
99
+
100
+ # docker
101
+ Dockerfile
102
+ DOCKER.md
103
+ docker-compose.yml
104
+ .dockerignore
Original file line number Diff line number Diff line change 4
4
# TODO(mc, 2021-02-12): this may be unnecessary by using `yarn run` instead
5
5
SHELL := bash
6
6
7
+ # add node_modules/.bin to PATH
8
+ PATH := $(shell cd .. && yarn bin) :$(PATH )
9
+
7
10
# These variables can be overriden when make is invoked to customize the
8
11
# behavior of jest
9
12
tests ?=
21
24
tsc --build --clean && yarn shx rm -rf \" dist\"
22
25
23
26
.PHONY : build
27
+ build : export NODE_ENV := production
24
28
build :
25
- rollup --config rollup.config.js
29
+ vite build
26
30
27
31
.PHONY : test
28
32
test :
Original file line number Diff line number Diff line change
1
+ import path , { resolve } from 'path'
2
+ import { defineConfig } from 'vite'
3
+
4
+ export default defineConfig ( {
5
+ plugins : [ ] ,
6
+ build : {
7
+ // Relative to the root
8
+ outDir : 'dist' ,
9
+ lib : {
10
+ entry : resolve ( __dirname , 'src/index.ts' ) ,
11
+ name : 'OpentronsApiClient' ,
12
+ formats : [ 'es' , 'umd' ] ,
13
+ fileName : format => `api-client.${ format } .js` ,
14
+ } ,
15
+ rollupOptions : {
16
+ external : [ ] ,
17
+ output : {
18
+ globals : { } ,
19
+ } ,
20
+ } ,
21
+ sourcemap : false ,
22
+ minify : true ,
23
+ } ,
24
+ optimizeDeps : {
25
+ esbuildOptions : {
26
+ target : 'es2020' ,
27
+ } ,
28
+ } ,
29
+ resolve : {
30
+ alias : {
31
+ '@opentrons/shared-data' : path . resolve ( '../shared-data/js/index.ts' ) ,
32
+ } ,
33
+ } ,
34
+ } )
Original file line number Diff line number Diff line change 42
42
"@eslint-react/eslint-plugin" : " 1.52.2" ,
43
43
"@ianvs/prettier-plugin-sort-imports" : " 4.4.1" ,
44
44
"@octokit/rest" : " ^19.0.5" ,
45
- "@rollup/plugin-alias" : " ^3.1.2" ,
46
- "@rollup/plugin-babel" : " ^5.3.0" ,
47
- "@rollup/plugin-commonjs" : " ^18.0.0" ,
48
- "@rollup/plugin-json" : " ^4.1.0" ,
49
- "@rollup/plugin-node-resolve" : " ^11.2.1" ,
50
- "@rollup/plugin-replace" : " ^2.4.2" ,
51
45
"@storybook/addon-actions" : " 7.6.17" ,
52
46
"@storybook/addon-essentials" : " 7.6.17" ,
53
47
"@storybook/addon-links" : " 7.6.17" ,
137
131
"redux-mock-store" : " 1.5.5" ,
138
132
"rehype" : " ^9.0.0" ,
139
133
"rehype-urls" : " ^1.0.0" ,
140
- "rollup" : " ^2.44.0" ,
141
- "rollup-plugin-peer-deps-external" : " ^2.2.4" ,
142
- "rollup-plugin-terser" : " ^7.0.2" ,
143
134
"script-ext-html-webpack-plugin" : " ^2.1.4" ,
144
135
"semver" : " ^7.3.8" ,
145
136
"shx" : " ^0.3.4" ,
Original file line number Diff line number Diff line change 3
3
# using bash instead of /bin/bash in SHELL prevents macOS optimizing away our PATH update
4
4
# TODO(mc, 2021-02-12): this may be unnecessary by using `yarn run` instead
5
5
SHELL := bash
6
+ # add node_modules/.bin to PATH
7
+ PATH := $(shell cd .. && yarn bin) :$(PATH )
6
8
7
9
# These variables can be overriden when make is invoked to customize the
8
10
# behavior of jest
21
23
yarn shx rm -rf dist
22
24
23
25
.PHONY : build
26
+ build : export NODE_ENV := production
24
27
build :
25
- rollup --config rollup.config.js
28
+ vite build
26
29
27
30
.PHONY : test
28
31
test :
Original file line number Diff line number Diff line change
1
+ import path , { resolve } from 'path'
2
+ import { defineConfig } from 'vite'
3
+
4
+ export default defineConfig ( {
5
+ plugins : [ ] ,
6
+ build : {
7
+ // Relative to the root
8
+ outDir : 'dist' ,
9
+ lib : {
10
+ entry : resolve ( __dirname , 'src/index.ts' ) ,
11
+ name : 'OpentronsReactApiClient' ,
12
+ formats : [ 'es' , 'umd' ] ,
13
+ fileName : format => `react-api-client.${ format } .js` ,
14
+ } ,
15
+ rollupOptions : {
16
+ external : [ ] ,
17
+ output : {
18
+ globals : { } ,
19
+ } ,
20
+ } ,
21
+ sourcemap : false ,
22
+ minify : true ,
23
+ } ,
24
+ optimizeDeps : {
25
+ esbuildOptions : {
26
+ target : 'es2020' ,
27
+ } ,
28
+ } ,
29
+ resolve : {
30
+ alias : {
31
+ '@opentrons/shared-data' : path . resolve ( '../shared-data/js/index.ts' ) ,
32
+ '@opentrons/api-client' : path . resolve ( '../api-client/src/index.ts' ) ,
33
+ } ,
34
+ } ,
35
+ } )
You can’t perform that action at this time.
0 commit comments