|
3 | 3 | "version": "6.1.0", |
4 | 4 | "description": "A React Tiling Window Manager", |
5 | 5 | "license": "Apache-2.0", |
6 | | - "main": "lib/index.js", |
| 6 | + "main": "./cjs/index.js", |
| 7 | + "module": "./esm/index.js", |
| 8 | + "typings": "index.d.ts", |
| 9 | + "exports": { |
| 10 | + "import": "./esm/index.js", |
| 11 | + "require": "./cjs/index.js", |
| 12 | + "default": "./cjs/index.js" |
| 13 | + }, |
7 | 14 | "style": "lib/react-mosaic.css", |
8 | | - "type": "commonjs", |
9 | | - "typings": "lib/index.d.ts", |
| 15 | + "files": [ |
| 16 | + "/lib", |
| 17 | + "/index.d.ts" |
| 18 | + ], |
10 | 19 | "repository": { |
11 | 20 | "type": "git", |
12 | 21 | "url": "https://github.com/nomcopter/react-mosaic.git" |
|
25 | 34 | ], |
26 | 35 | "scripts": { |
27 | 36 | "build": "npm-run-all clean -lp build:**", |
28 | | - "build:ts": "tsc -p tsconfig-build.json", |
29 | 37 | "build:less": "lessc --autoprefix=defaults styles/index.less react-mosaic-component.css", |
30 | | - "bundle": "rm -rf docs/ && webpack --config webpack/bundle.ts", |
31 | | - "clean": "rm -rf lib/", |
| 38 | + "build:esm": "tsc --project tsconfig-build.json --declaration false --rootDir src --module esnext --outDir ./lib/esm", |
| 39 | + "build:cjs": "tsc --project tsconfig-build.json --declaration false --rootDir src --module commonjs --outDir ./lib/cjs", |
| 40 | + "build:declaration": "tsc --project tsconfig-build.json --rootDir src --outDir ./lib --emitDeclarationOnly", |
| 41 | + "bundle": "shx rm -rf docs/ && webpack --config webpack/bundle.ts", |
| 42 | + "clean": "shx rm -rf lib/", |
32 | 43 | "start": "webpack-dev-server --config webpack/hot.ts", |
33 | 44 | "prettier:run": "prettier 'styles/*.less' '*.md' '{,.}*.yml' '.circleci/*.yml'", |
34 | 45 | "test": "npm-run-all build -lp test:**", |
|
42 | 53 | }, |
43 | 54 | "dependencies": { |
44 | 55 | "classnames": "^2.3.2", |
| 56 | + "dnd-core": "16.0.1", |
45 | 57 | "immutability-helper": "^3.1.1", |
46 | 58 | "lodash": "^4.17.21", |
47 | 59 | "prop-types": "^15.8.1", |
|
68 | 80 | "@types/webpack": "^5.28.0", |
69 | 81 | "chai": "^4.3.6", |
70 | 82 | "css-loader": "^6.7.3", |
71 | | - "dnd-core": "16.0.1", |
72 | 83 | "html-loader": "^4.2.0", |
73 | 84 | "html-webpack-plugin": "^5.5.0", |
74 | 85 | "jsdom": "^15.2.1", |
|
85 | 96 | "react-dom": "^18.2.0", |
86 | 97 | "react-refresh": "^0.14.0", |
87 | 98 | "source-map-loader": "^4.0.1", |
| 99 | + "shx": "0.3.4", |
88 | 100 | "style-loader": "^3.3.1", |
89 | 101 | "ts-loader": "^9.4.2", |
90 | 102 | "ts-node": "^10.9.1", |
|
0 commit comments