@logicflow/extension 2.0.2 → 2.0.4

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/es/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- import './index.less';
2
1
  export * from './bpmn';
3
2
  export * from './bpmn-adapter';
4
3
  export * from './bpmn-elements';
package/es/index.js CHANGED
@@ -1,4 +1,3 @@
1
- import './index.less';
2
1
  // BPMN 相关
3
2
  export * from './bpmn';
4
3
  export * from './bpmn-adapter';
package/es/index.less CHANGED
@@ -1 +1 @@
1
- @import url('./style/index');
1
+ @import url('./style/index.less');
package/lib/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- import './index.less';
2
1
  export * from './bpmn';
3
2
  export * from './bpmn-adapter';
4
3
  export * from './bpmn-elements';
package/lib/index.js CHANGED
@@ -14,7 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- require("./index.less");
18
17
  // BPMN 相关
19
18
  __exportStar(require("./bpmn"), exports);
20
19
  __exportStar(require("./bpmn-adapter"), exports);
package/lib/index.less CHANGED
@@ -1 +1 @@
1
- @import url('./style/index');
1
+ @import url('./style/index.less');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logicflow/extension",
3
- "version": "2.0.2",
3
+ "version": "2.0.4",
4
4
  "description": "LogicFlow Extensions",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -20,7 +20,7 @@
20
20
  "author": "Logicflow-Team",
21
21
  "license": "Apache-2.0",
22
22
  "peerDependencies": {
23
- "@logicflow/core": "2.0.2"
23
+ "@logicflow/core": "2.0.3"
24
24
  },
25
25
  "dependencies": {
26
26
  "@antv/hierarchy": "^0.6.11",
@@ -28,13 +28,16 @@
28
28
  "lodash-es": "^4.17.21",
29
29
  "medium-editor": "^5.23.3",
30
30
  "mobx": "^5.15.7",
31
- "postcss-import": "^16.1.0",
32
- "postcss-url": "^10.1.3",
33
31
  "preact": "^10.17.1",
34
32
  "rangy": "^1.3.1",
35
- "rollup-plugin-postcss": "^4.0.2",
36
33
  "vanilla-picker": "^2.12.3",
37
- "@logicflow/core": "2.0.2"
34
+ "@logicflow/core": "2.0.3"
35
+ },
36
+ "devDependencies": {
37
+ "less": "^4.1.1",
38
+ "postcss-url": "^10.1.3",
39
+ "postcss-import": "^16.1.0",
40
+ "rollup-plugin-postcss": "^4.0.2"
38
41
  },
39
42
  "scripts": {
40
43
  "clean:turbo": "rss",
@@ -48,7 +51,7 @@
48
51
  "build:watch": "rss",
49
52
  "build:watch:esm": "rss",
50
53
  "build:watch:cjs": "rss",
51
- "build": "rss",
54
+ "build": "run-p -s build:dev build:umd",
52
55
  "prebuild": "rss",
53
56
  "test": "echo \"Error: no test specified\" && exit 1"
54
57
  }
package/rollup.config.js CHANGED
@@ -1,19 +1,38 @@
1
+ import path from 'node:path'
1
2
  import postcss from 'rollup-plugin-postcss'
2
3
  import postcssUrl from 'postcss-url'
3
4
  import postcssImport from 'postcss-import'
4
5
  import { rollupConfig } from '../../rollup.config'
5
6
 
6
- export default rollupConfig({
7
- plugins: [
8
- postcss({
9
- plugins: [
10
- postcssImport(),
11
- postcssUrl({
12
- url: 'inline', // 选择 'inline' 选项将外部资源内联到最终的 CSS 文件中
13
- // maxSize: 10, // 以KB为单位的最大文件大小,超过此大小的文件将不会被内联
14
- }),
15
- ],
16
- extract: 'index.css', // 提取到一个单独的 CSS 文件
17
- }),
18
- ],
19
- })
7
+ export default [
8
+ {
9
+ input: 'src/index.less',
10
+ output: {
11
+ file: 'dist/index.css',
12
+ },
13
+ plugins: [
14
+ postcss({
15
+ plugins: [
16
+ postcssImport({
17
+ resolve: (id) => {
18
+ if (id.startsWith('~')) {
19
+ return path.resolve('node_modules', id.slice(1))
20
+ }
21
+ return id
22
+ },
23
+ }),
24
+ postcssUrl({
25
+ url: 'inline', // 选择 'inline' 选项将外部资源内联到最终的 CSS 文件中
26
+ // maxSize: 10, // 以KB为单位的最大文件大小,超过此大小的文件将不会被内联
27
+ }),
28
+ ],
29
+ use: [['less', { javascriptEnabled: true }]],
30
+ extract: true,
31
+ // extract: 'index.css', // 提取到一个单独的 CSS 文件
32
+ // extract: path.resolve('dist/index.css'), // 提取到一个单独的 CSS 文件
33
+ minimize: true,
34
+ }),
35
+ ],
36
+ },
37
+ rollupConfig(),
38
+ ]
package/src/index.less CHANGED
@@ -1 +1 @@
1
- @import url('./style/index');
1
+ @import url('./style/index.less');
package/src/index.ts CHANGED
@@ -1,5 +1,3 @@
1
- import './index.less'
2
-
3
1
  // BPMN 相关
4
2
  export * from './bpmn'
5
3
  export * from './bpmn-adapter'