datajunction-ui 0.0.1-rc.1 → 0.0.1-rc.3

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.
@@ -0,0 +1,29 @@
1
+ /**
2
+ * @license React
3
+ * react-dom.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */
10
+
11
+ /**
12
+ * @license React
13
+ * react.production.min.js
14
+ *
15
+ * Copyright (c) Facebook, Inc. and its affiliates.
16
+ *
17
+ * This source code is licensed under the MIT license found in the
18
+ * LICENSE file in the root directory of this source tree.
19
+ */
20
+
21
+ /**
22
+ * @license React
23
+ * scheduler.production.min.js
24
+ *
25
+ * Copyright (c) Facebook, Inc. and its affiliates.
26
+ *
27
+ * This source code is licensed under the MIT license found in the
28
+ * LICENSE file in the root directory of this source tree.
29
+ */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datajunction-ui",
3
- "version": "0.0.1-rc.1",
3
+ "version": "0.0.1-rc.3",
4
4
  "description": "DataJunction Metrics Platform UI",
5
5
  "module": "src/index.tsx",
6
6
  "repository": {
@@ -44,8 +44,6 @@
44
44
  "eslint-config-prettier": "8.5.0",
45
45
  "eslint-plugin-prettier": "4.2.1",
46
46
  "eslint-plugin-react-hooks": "4.6.0",
47
- "fbemitter": "3.0.0",
48
- "flux": "4.0.4",
49
47
  "fontfaceobserver": "2.3.0",
50
48
  "husky": "8.0.1",
51
49
  "i18next": "21.9.2",
@@ -102,7 +100,8 @@
102
100
  "generate": "plop --plopfile internals/generators/plopfile.ts",
103
101
  "cleanAndSetup": "ts-node ./internals/scripts/clean.ts",
104
102
  "prettify": "prettier --write",
105
- "extract-messages": "i18next-scanner --config=internals/extractMessages/i18next-scanner.config.js"
103
+ "extract-messages": "i18next-scanner --config=internals/extractMessages/i18next-scanner.config.js",
104
+ "prepublishOnly": "webpack --mode=production"
106
105
  },
107
106
  "eslintConfig": {
108
107
  "extends": "react-app"
package/src/app/index.tsx CHANGED
@@ -32,9 +32,18 @@ export function App() {
32
32
  element={<Root />}
33
33
  children={
34
34
  <>
35
- <Route path="nodes/:name" element={<NodePage />} />
36
- <Route path="namespaces" element={<ListNamespacesPage />} />
37
- <Route path="namespaces/:namespace" element={<NamespacePage />} />
35
+ <Route path="nodes" key="nodes">
36
+ <Route path=":name" element={<NodePage />} />
37
+ </Route>
38
+
39
+ <Route path="/" element={<ListNamespacesPage />} key="index" />
40
+ <Route path="namespaces">
41
+ <Route
42
+ path=":namespace"
43
+ element={<NamespacePage />}
44
+ key="namespaces"
45
+ />
46
+ </Route>
38
47
  </>
39
48
  }
40
49
  />
package/tsconfig.json CHANGED
@@ -21,7 +21,7 @@
21
21
  "removeComments": true,
22
22
  "sourceMap": true
23
23
  },
24
- "include": ["src", "internals/startingTemplate/**/*"],
24
+ "include": ["src/**/*.ts", "src/**/*.tsx", "internals/startingTemplate/**/*"],
25
25
  "ts-node": {
26
26
  "compilerOptions": {
27
27
  "esModuleInterop": true,
package/webpack.config.js CHANGED
@@ -1,6 +1,6 @@
1
1
  const path = require('path');
2
2
  const HtmlWebpackPlugin = require('html-webpack-plugin');
3
- const MiniCssExtractPlugin = require('mini-css-extract-plugin');
3
+ // const MiniCssExtractPlugin = require('mini-css-extract-plugin');
4
4
 
5
5
  var babelOptions = {
6
6
  presets: ['@babel/preset-react'],
@@ -10,17 +10,23 @@ module.exports = {
10
10
  cache: true,
11
11
  entry: {
12
12
  main: './src/index.tsx',
13
- vendor: ['events', 'fbemitter', 'flux', 'react', 'react-dom'],
13
+ vendor: ['events', 'react', 'react-dom'],
14
14
  },
15
15
  target: 'web',
16
16
  mode: 'development',
17
17
  output: {
18
18
  path: path.resolve(__dirname, './dist'),
19
19
  filename: 'static/[name].[fullhash].js',
20
+ library: 'datajunction-ui',
21
+ libraryTarget: 'umd',
22
+ globalObject: 'this',
23
+ umdNamedDefine: true,
20
24
  publicPath: '/',
21
25
  },
22
26
  devServer: {
23
- historyApiFallback: true,
27
+ historyApiFallback: {
28
+ disableDotRule: true,
29
+ },
24
30
  },
25
31
  resolve: {
26
32
  extensions: ['.js', '.jsx', '.json', '.ts', '.tsx'],