|
109 | 109 | "import": "./lib/version.js", |
110 | 110 | "require": "./lib/version.cjs.js" |
111 | 111 | }, |
112 | | - "./package.json": "./package.json" |
| 112 | + "./package.json": "./package.json", |
| 113 | + "./design": { |
| 114 | + "import": { |
| 115 | + "default": "./lib/design/esm/index.js", |
| 116 | + "types": "./lib/design/esm/index.d.ts" |
| 117 | + }, |
| 118 | + "require": { |
| 119 | + "default": "./lib/design/cjs/index.js", |
| 120 | + "types": "./lib/design/cjs/index.d.ts" |
| 121 | + } |
| 122 | + }, |
| 123 | + "./design/react": { |
| 124 | + "import": { |
| 125 | + "default": "./lib/design/esm/react/index.js", |
| 126 | + "types": "./lib/design/esm/react/index.d.ts" |
| 127 | + }, |
| 128 | + "require": { |
| 129 | + "default": "./lib/design/cjs/react/index.js", |
| 130 | + "types": "./lib/design/cjs/react/index.d.ts" |
| 131 | + } |
| 132 | + } |
113 | 133 | }, |
114 | 134 | "main": "lib/index.cjs.js", |
115 | 135 | "module": "lib/index.esm.js", |
|
122 | 142 | "scripts": { |
123 | 143 | "build": "react-scripts build", |
124 | 144 | "build:lib": "ts-node --compiler-options '{\"module\": \"commonjs\", \"target\": \"ES6\" }' ./scripts/generateFileList.ts && rollup -c", |
| 145 | + "build:design": "tsc -p tsconfig.design.json && tsc -p tsconfig.design.json --module commonjs --outDir lib/design/cjs && yarn build:design:copy", |
| 146 | + "build:design:copy": "cpx 'src/design/**/*.css' lib/design/cjs && cpx 'src/design/**/*.css' lib/design/esm", |
125 | 147 | "check:size": "npm-pack-all --output commerce-sdk-isomorphic-with-deps.tgz && bundlesize", |
126 | | - "check:types": "tsc --noEmit", |
| 148 | + "check:types": "tsc -p tsconfig.sdk.json --noEmit", |
127 | 149 | "ci": "rm -rf node_modules && yarn install", |
128 | 150 | "clean": "rm -rf build lib src/lib commerce-sdk-isomorphic-with-deps.tgz", |
129 | 151 | "depcheck": "depcheck", |
|
135 | 157 | "fix:style": "yarn run lint:style -- --fix", |
136 | 158 | "generateVersionTable": "ts-node --compiler-options '{\"module\": \"commonjs\", \"target\": \"ES6\" }' ./scripts/generateVersionTable.ts", |
137 | 159 | "lint": "eslint --ext js,jsx,ts,tsx .", |
138 | | - "lint:style": "stylelint ./src/", |
| 160 | + "lint:style": "stylelint ./src/**/*.css", |
139 | 161 | "prepare": "snyk protect", |
140 | 162 | "renderTemplates": "PACKAGE_VERSION=$(node -p \"require('./package.json').version\") ts-node --compiler-options '{\"module\": \"commonjs\", \"target\": \"ES6\" }' ./scripts/generate-oas.ts", |
141 | 163 | "start": "HTTPS=true react-scripts start", |
142 | 164 | "pretest": "yarn run lint && yarn run lint:style && depcheck && yarn run check:size", |
143 | 165 | "test": "yarn run check:types && yarn run test:unit && CI=true yarn run test:react", |
| 166 | + "test:design": "jest --config src/design/jest.config.js src/design", |
144 | 167 | "test:react": "react-scripts test --env=jest-environment-jsdom-sixteen src/environment --setupFilesAfterEnv ./src/test/setupTests.ts", |
145 | | - "test:unit": "jest --coverage --testPathIgnorePatterns node_modules src/environment --silent", |
| 168 | + "test:unit": "jest --coverage --testPathIgnorePatterns node_modules src/design src/environment --silent", |
146 | 169 | "updateApis": "ts-node --compiler-options '{\"module\": \"commonjs\", \"target\": \"ES6\" }' ./scripts/updateApis.ts && yarn diffApis" |
147 | 170 | }, |
148 | 171 | "husky": { |
|
203 | 226 | "@typescript-eslint/parser": "^4.33.0", |
204 | 227 | "autoprefixer": "9.8.8", |
205 | 228 | "bundlesize2": "^0.0.31", |
| 229 | + "cpx": "^1.5.0", |
206 | 230 | "depcheck": "^1.4.3", |
207 | 231 | "dotenv": "^16.0.3", |
208 | 232 | "eslint": "^7.32.0", |
|
242 | 266 | "stylelint": "13.13.1", |
243 | 267 | "stylelint-config-standard": "20.0.0", |
244 | 268 | "stylelint-order": "4.1.0", |
| 269 | + "ts-jest": "26.x.x", |
245 | 270 | "ts-node": "9.1.1", |
246 | 271 | "typedoc": "^0.17.7", |
247 | 272 | "typedoc-plugin-external-module-map": "1.2.1", |
|
0 commit comments