@opentrons/components 0.0.0-alpha.14 → 0.0.0-dev

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Makefile CHANGED
@@ -9,6 +9,9 @@ tests ?=
9
9
  cov_opts ?= --coverage=true --ci=true --collectCoverageFrom='components/src/**/*.(js|ts|tsx)'
10
10
  test_opts ?=
11
11
 
12
+ # outputs
13
+ main_out := lib/index.js lib/index.js.map
14
+
12
15
  # standard targets
13
16
  #####################################################################
14
17
 
@@ -26,6 +29,11 @@ clean:
26
29
  dist:
27
30
  yarn --cwd .. build-storybook
28
31
 
32
+ .PHONY: lib
33
+ lib: export NODE_ENV := production
34
+ lib:
35
+ yarn webpack
36
+
29
37
  # development
30
38
  #####################################################################
31
39
 
package/README.md CHANGED
@@ -68,20 +68,3 @@ Unit tests live in a `__tests__` directory in the same directory as the module u
68
68
 
69
69
  [jest-snapshots]: https://facebook.github.io/jest/docs/en/snapshot-testing.html
70
70
  [contributing]: ../CONTRIBUTING.md
71
-
72
- ### Flow definitions
73
-
74
- While the components library is written in TypeScript, some dependents of the components library are not yet converted. To ease the conversion effort, `components/flow-types` contains automatically generated Flow type definitions from the TypeScript typings generated by `tsc`.
75
-
76
- To generate these definitions
77
-
78
- ```shell
79
- # ensure all TypeScript definitions are built
80
- make build-ts
81
-
82
- # build flow definitions (this may take a while!)
83
- make -C components flow-types
84
-
85
- # you can also build individual files if you're testing out small changes
86
- make -C components flow-types/buttons/Button.js.flow
87
- ```
package/package.json CHANGED
@@ -1,10 +1,12 @@
1
1
  {
2
2
  "name": "@opentrons/components",
3
- "version": "0.0.0-alpha.14",
3
+ "version": "0.0.0-dev",
4
4
  "description": "React components library for Opentrons' projects",
5
5
  "source": "src/index.ts",
6
6
  "types": "lib/index.d.ts",
7
7
  "style": "src/index.css",
8
+ "main": "lib/opentrons-components.js",
9
+ "module": "src/index.ts",
8
10
  "repository": {
9
11
  "type": "git",
10
12
  "url": "git+https://github.com/Opentrons/opentrons.git"
@@ -20,7 +22,7 @@
20
22
  "react-router-dom": "5.1.1"
21
23
  },
22
24
  "dependencies": {
23
- "@opentrons/shared-data": "0.0.0-alpha.14",
25
+ "@opentrons/shared-data": "link:../shared-data",
24
26
  "@popperjs/core": "2.1.1",
25
27
  "@react-spring/types": "9.6.1",
26
28
  "@react-spring/web": "9.6.1",
@@ -0,0 +1,19 @@
1
+ 'use strict'
2
+
3
+ const path = require('path')
4
+ const webpackMerge = require('webpack-merge')
5
+ const { baseConfig } = require('@opentrons/webpack-config')
6
+
7
+ const ENTRY_INDEX = path.join(__dirname, 'src/index.ts')
8
+ const OUTPUT_PATH = path.join(__dirname, 'lib')
9
+
10
+ module.exports = async () =>
11
+ webpackMerge(baseConfig, {
12
+ entry: { index: ENTRY_INDEX },
13
+ output: {
14
+ path: OUTPUT_PATH,
15
+ filename: 'opentrons-components.js',
16
+ library: '@opentrons/components',
17
+ libraryTarget: 'umd'
18
+ },
19
+ })