|
3 | 3 | "version": "6.1.0",
|
4 | 4 | "description": "A React Tiling Window Manager",
|
5 | 5 | "license": "Apache-2.0",
|
6 |
| - "main": "./lib/cjs/index.js", |
7 |
| - "module": "./lib/esm/index.js", |
8 |
| - "typings": "./lib/index.d.ts", |
| 6 | + "main": "./index.mjs", |
| 7 | + "type": "module", |
9 | 8 | "exports": {
|
| 9 | + "./react-mosaic-component.css": "./react-mosaic-component.css", |
| 10 | + "./package.json": "./package.json", |
10 | 11 | ".": {
|
11 |
| - "import": "./lib/esm/index.js", |
12 |
| - "require": "./lib/cjs/index.js" |
13 |
| - }, |
14 |
| - "./react-mosaic-component.css": { |
15 |
| - "import": "./react-mosaic-component.css", |
16 |
| - "require": "./react-mosaic-component.css" |
| 12 | + "import": "./index.mjs", |
| 13 | + "default": "./index.cjs" |
17 | 14 | }
|
18 | 15 | },
|
19 | 16 | "style": "./react-mosaic-component.css",
|
20 |
| - "files": ["/lib", "react-mosaic-component.css"], |
21 | 17 | "repository": {
|
22 | 18 | "type": "git",
|
23 | 19 | "url": "https://github.com/nomcopter/react-mosaic.git"
|
|
35 | 31 | "*.css"
|
36 | 32 | ],
|
37 | 33 | "scripts": {
|
38 |
| - "build": "npm-run-all clean -lp build:**", |
| 34 | + "build": "npm-run-all clean -lp build:** && run-s copy", |
39 | 35 | "build:less": "lessc --autoprefix=defaults styles/index.less react-mosaic-component.css",
|
40 |
| - "build:esm": "tsc --project tsconfig-build.json --declaration false --rootDir src --module esnext --outDir ./lib/esm", |
41 |
| - "build:cjs": "tsc --project tsconfig-build.json --declaration false --rootDir src --module commonjs --outDir ./lib/cjs", |
42 |
| - "build:declaration": "tsc --project tsconfig-build.json --rootDir src --outDir ./lib --emitDeclarationOnly", |
| 36 | + "build:js": "tsup", |
| 37 | + "build:check": "tsc --noEmit", |
| 38 | + "copy": "shx cp package.json ./lib/package.json && shx cp README.md ./lib/README.md && shx cp LICENSE ./lib/LICENSE && shx cp react-mosaic-component.css ./lib/react-mosaic-component.css", |
| 39 | + "check": "attw --pack lib --entrypoints .", |
43 | 40 | "bundle": "shx rm -rf docs/ && webpack --config webpack/bundle.ts",
|
44 | 41 | "clean": "shx rm -rf lib/",
|
45 | 42 | "start": "webpack-dev-server --config webpack/hot.ts",
|
46 |
| - "prettier:run": "prettier 'styles/*.less' '*.md' '{,.}*.yml' '.circleci/*.yml'", |
| 43 | + "prettier:run": "prettier \"styles/*.less\" \"*.md\" \"{,.}*.yml\" \".circleci/*.yml\"", |
47 | 44 | "test": "npm-run-all build -lp test:**",
|
48 |
| - "test:lint": "tslint -c tslint.yml -p tsconfig.json -e test", |
49 |
| - "test:unit": "cross-env TS_NODE_COMPILER_OPTIONS={\\\"module\\\":\\\"commonjs\\\"} mocha", |
50 |
| - "test:format": "yarn run prettier:run --list-different", |
| 45 | + "test-disabled:lint": "tslint -c tslint.yml -p tsconfig.json -e test", |
| 46 | + "test:unit": "vitest run", |
51 | 47 | "fix": "npm-run-all -lp fix:**",
|
52 | 48 | "fix:format": "yarn run prettier:run --write",
|
53 | 49 | "fix:lint": "yarn run test:lint --fix",
|
|
57 | 53 | "classnames": "^2.3.2",
|
58 | 54 | "dnd-core": "16.0.1",
|
59 | 55 | "immutability-helper": "^3.1.1",
|
60 |
| - "lodash": "^4.17.21", |
| 56 | + "lodash-es": "^4.17.21", |
61 | 57 | "prop-types": "^15.8.1",
|
62 | 58 | "rdndmb-html5-to-touch": "^8.0.0",
|
63 | 59 | "react-dnd": "^16.0.1",
|
|
67 | 63 | "uuid": "^9.0.0"
|
68 | 64 | },
|
69 | 65 | "devDependencies": {
|
| 66 | + "@arethetypeswrong/cli": "0.16.1", |
70 | 67 | "@blueprintjs/core": "^4.15.1",
|
71 | 68 | "@blueprintjs/icons": "^4.13.1",
|
72 | 69 | "@pmmmwh/react-refresh-webpack-plugin": "^0.5.10",
|
73 |
| - "@types/chai": "^4.3.0", |
74 | 70 | "@types/classnames": "^2.3.1",
|
75 | 71 | "@types/dom4": "^2.0.2",
|
76 |
| - "@types/lodash": "^4.14.191", |
77 |
| - "@types/mocha": "^7.0.2", |
| 72 | + "@types/lodash-es": "4.17.12", |
78 | 73 | "@types/prop-types": "^15.7.5",
|
79 | 74 | "@types/react": "^18.0.28",
|
80 | 75 | "@types/react-dom": "^18.0.10",
|
81 | 76 | "@types/uuid": "^9.0.0",
|
82 | 77 | "@types/webpack": "^5.28.0",
|
83 |
| - "chai": "^4.3.6", |
84 | 78 | "cross-env": "7.0.3",
|
85 | 79 | "css-loader": "^6.7.3",
|
| 80 | + "esbuild-plugin-file-path-extensions": "^2.1.2", |
86 | 81 | "html-loader": "^4.2.0",
|
87 | 82 | "html-webpack-plugin": "^5.5.0",
|
88 | 83 | "jsdom": "^15.2.1",
|
89 | 84 | "jsdom-global": "^3.0.2",
|
90 | 85 | "less": "^3.13.1",
|
91 | 86 | "less-loader": "^11.1.0",
|
92 | 87 | "less-plugin-autoprefix": "^2.0.0",
|
93 |
| - "mocha": "^6.2.3", |
94 |
| - "mocha-junit-reporter": "^1.23.3", |
95 | 88 | "mock-require": "^3.0.3",
|
96 | 89 | "npm-run-all": "^4.1.5",
|
97 |
| - "prettier": "^2.8.4", |
| 90 | + "prettier": "2.8.4", |
98 | 91 | "react": "^18.2.0",
|
99 | 92 | "react-dom": "^18.2.0",
|
100 | 93 | "react-refresh": "^0.14.0",
|
101 |
| - "source-map-loader": "^4.0.1", |
102 | 94 | "shx": "0.3.4",
|
| 95 | + "source-map-loader": "^4.0.1", |
103 | 96 | "style-loader": "^3.3.1",
|
104 | 97 | "ts-loader": "^9.4.2",
|
105 |
| - "ts-node": "^10.9.1", |
106 | 98 | "tslint": "^6.1.3",
|
107 | 99 | "tslint-config-prettier": "^1.18.0",
|
108 | 100 | "tslint-plugin-prettier": "^2.3.0",
|
109 | 101 | "tslint-react": "^5.0.0",
|
110 |
| - "typescript": "^4.9.5", |
| 102 | + "tsup": "^8.2.4", |
| 103 | + "typescript": "5.5.4", |
| 104 | + "vitest": "^2.0.5", |
111 | 105 | "webpack": "^5.75.0",
|
112 | 106 | "webpack-cli": "^5.0.1",
|
113 | 107 | "webpack-dev-server": "^4.11.1",
|
|
0 commit comments