@equinor/fusion-framework-cli 7.0.13 → 8.0.0

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.
@@ -20,7 +20,7 @@
20
20
  };
21
21
  </script>
22
22
 
23
- <script type="module" crossorigin src="/assets/index-db8f1e6a.js"></script>
23
+ <script type="module" crossorigin src="/assets/index-6bd97f49.js"></script>
24
24
 
25
25
  <body style="height: 100vh;">
26
26
  <div id="root" style="height: 100%;"></div>
package/bin/main.js CHANGED
@@ -12,7 +12,7 @@ import { Command } from 'commander';
12
12
  import ora from 'ora';
13
13
  import { build, mergeConfig } from 'vite';
14
14
  import startDevServer from './serve.js';
15
- import createConfig from './create-config.js';
15
+ import { createConfig, loadCustomConfig } from './create-config.js';
16
16
  import { resolveAppConfig } from './app-config.js';
17
17
  const program = new Command();
18
18
  program.name('fusion-framework-cli');
@@ -25,10 +25,12 @@ app.command('dev')
25
25
  .description('Create a development server')
26
26
  .option('-p, --port <number>', 'dev-server port', '3000')
27
27
  .option('--portal <string>', 'fusion portal host')
28
- .action(({ port, portal }) => __awaiter(void 0, void 0, void 0, function* () {
28
+ .option('-c, --config <file>', 'Use specified config file, see https://vitejs.dev/guide/cli.html#build')
29
+ .action(({ port, portal, config }) => __awaiter(void 0, void 0, void 0, function* () {
29
30
  var _a;
30
31
  const spinner = ora('Loading configuration').start();
31
- const viteConfig = mergeConfig(yield createConfig(), { server: { port } });
32
+ const customConfig = config ? yield loadCustomConfig(config) : {};
33
+ const viteConfig = mergeConfig(yield createConfig(), Object.assign(Object.assign({}, customConfig), { server: { port } }));
32
34
  const appConfig = yield resolveAppConfig();
33
35
  appConfig.portalHost = portal
34
36
  ? portal
@@ -36,7 +38,13 @@ app.command('dev')
36
38
  spinner.succeed('Configuration loaded');
37
39
  startDevServer({ viteConfig, appConfig });
38
40
  }));
39
- app.command('build').action(() => __awaiter(void 0, void 0, void 0, function* () {
40
- build(mergeConfig(yield createConfig(), { build: { emptyOutDir: true } }));
41
+ app.command('build')
42
+ .option('-c, --config <file>', 'Use specified config file, see https://vitejs.dev/guide/cli.html#build')
43
+ .action(({ config }) => __awaiter(void 0, void 0, void 0, function* () {
44
+ const spinner = ora('Loading configuration').start();
45
+ const customConfig = config ? yield loadCustomConfig(config) : {};
46
+ const viteConfig = mergeConfig(yield createConfig({ mode: 'production' }), Object.assign({ build: { emptyOutDir: true } }, customConfig));
47
+ spinner.succeed('Configuration loaded');
48
+ build(viteConfig);
41
49
  }));
42
50
  program.parse();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/fusion-framework-cli",
3
- "version": "7.0.13",
3
+ "version": "8.0.0",
4
4
  "keywords": [
5
5
  "Fusion",
6
6
  "Fusion Framework",
@@ -27,10 +27,10 @@
27
27
  "@equinor/eds-core-react": "^0.30.0",
28
28
  "@equinor/eds-icons": "^0.19.1",
29
29
  "@equinor/eds-tokens": "^0.9.0",
30
- "@equinor/fusion-framework-app": "^7.0.16",
31
- "@equinor/fusion-observable": "^8.0.1",
30
+ "@equinor/fusion-framework-app": "^7.1.0",
31
+ "@equinor/fusion-observable": "^8.0.3",
32
32
  "@vitejs/plugin-react": "^3.1.0",
33
- "commander": "^10.0.0",
33
+ "commander": "^11.0.0",
34
34
  "express": "^4.18.2",
35
35
  "find-up": "^6.3.0",
36
36
  "http-proxy-middleware": "^2.0.6",
@@ -46,13 +46,13 @@
46
46
  "@equinor/eds-core-react": "^0.30.0",
47
47
  "@equinor/eds-icons": "^0.19.1",
48
48
  "@equinor/eds-tokens": "^0.9.0",
49
- "@equinor/fusion-framework-app": "^7.0.16",
49
+ "@equinor/fusion-framework-app": "^7.1.0",
50
50
  "@equinor/fusion-framework-module-bookmark": "^1.0.7",
51
51
  "@equinor/fusion-framework-module-context": "^4.0.10",
52
- "@equinor/fusion-framework-react": "^5.2.2",
53
- "@equinor/fusion-framework-react-components-bookmark": "^0.1.14",
54
- "@equinor/fusion-framework-react-module-bookmark": "^2.0.12",
55
- "@equinor/fusion-query": "^3.0.2",
52
+ "@equinor/fusion-framework-react": "^5.2.3",
53
+ "@equinor/fusion-framework-react-components-bookmark": "^0.1.16",
54
+ "@equinor/fusion-framework-react-module-bookmark": "^2.0.13",
55
+ "@equinor/fusion-query": "^3.0.4",
56
56
  "@equinor/fusion-react-button": "^0.8.1",
57
57
  "@equinor/fusion-react-context-selector": "^0.4.3",
58
58
  "@equinor/fusion-react-icon": "^0.2.15",