|
3 | 3 | "version": "0.0.0-semantically-released", |
4 | 4 | "description": "Plugin for `graphql-compose` which wraps graphql types with Relay specific logic.", |
5 | 5 | "files": [ |
6 | | - "lib" |
| 6 | + "lib", |
| 7 | + "mjs" |
7 | 8 | ], |
8 | 9 | "main": "lib/index.js", |
| 10 | + "module": "mjs/index.mjs", |
9 | 11 | "repository": { |
10 | 12 | "type": "git", |
11 | 13 | "url": "https://github.com/graphql-compose/graphql-compose-relay.git" |
|
41 | 43 | "eslint-plugin-prettier": "^2.6.1", |
42 | 44 | "flow-bin": "^0.75.0", |
43 | 45 | "graphql": "0.13.2", |
44 | | - "graphql-compose": "^4.4.0", |
| 46 | + "graphql-compose": "^4.4.1", |
45 | 47 | "jest": "^23.2.0", |
46 | 48 | "prettier": "^1.13.6", |
47 | 49 | "rimraf": "^2.6.2", |
|
61 | 63 | ] |
62 | 64 | }, |
63 | 65 | "scripts": { |
64 | | - "build": "npm run build-cjs && npm run build-flow", |
65 | | - "build-cjs": "rimraf lib && babel src --ignore __tests__,__mocks__ -d lib", |
66 | | - "build-flow": "find ./src -name '*.js' -not -path '*/__*' | while read filepath; do cp $filepath `echo $filepath | sed 's/\\/src\\//\\/lib\\//g'`.flow; done", |
| 66 | + "build": "npm run build-cjs && npm run build-mjs", |
| 67 | + "build-cjs": "rimraf lib && babel src --ignore __tests__,__mocks__ -d lib && COPY_TO_FOLDER=lib npm run build-flow", |
| 68 | + "build-mjs": "rimraf mjs && BABEL_ENV=mjs babel src --ignore __tests__,__mocks__ -d mjs && yarn build-mjs-rename && COPY_TO_FOLDER=mjs npm run build-flow", |
| 69 | + "build-mjs-rename": "find ./mjs -name \"*.js\" -exec bash -c 'mv \"$1\" \"${1%.js}\".mjs' - '{}' \\;", |
| 70 | + "build-flow": "find ./src -name '*.js' -not -path '*/__*' | while read filepath; do cp $filepath `echo ./${COPY_TO_FOLDER:-lib}$filepath | sed 's/.\\/src\\//\\//g'`.flow; done", |
67 | 71 | "watch": "jest --watch", |
68 | 72 | "coverage": "jest --coverage", |
69 | 73 | "lint": "eslint --ext .js ./src", |
|
0 commit comments