|
3 | 3 | "version": "0.0.0-semantically-released",
|
4 | 4 | "description": "Elastic search via GraphQL",
|
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/nodkz/graphql-compose-elasticsearch.git"
|
|
34 | 36 | "babel-cli": "^6.26.0",
|
35 | 37 | "babel-eslint": "^8.2.5",
|
36 | 38 | "babel-jest": "^23.2.0",
|
| 39 | + "babel-plugin-transform-class-properties": "^6.24.1", |
37 | 40 | "babel-plugin-transform-flow-strip-types": "^6.22.0",
|
38 | 41 | "babel-plugin-transform-object-rest-spread": "^6.26.0",
|
39 | 42 | "babel-plugin-transform-runtime": "^6.23.0",
|
|
69 | 72 | ]
|
70 | 73 | },
|
71 | 74 | "scripts": {
|
72 |
| - "build": "npm-run-all build:*", |
73 |
| - "build:lib": "rimraf lib && babel src --ignore __tests__,__mocks__ -d lib", |
74 |
| - "build:flow": "find ./src -name '*.js' -not -path '*/__*' | while read filepath; do cp $filepath `echo $filepath | sed 's/\\/src\\//\\/lib\\//g'`.flow; done", |
| 75 | + "build": "npm run build-cjs && npm run build-mjs", |
| 76 | + "build-cjs": "rimraf lib && BABEL_ENV=cjs babel src --ignore __tests__,__mocks__ -d lib && COPY_TO_FOLDER=lib npm run build-flow", |
| 77 | + "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", |
| 78 | + "build-mjs-rename": "find ./mjs -name \"*.js\" -exec bash -c 'mv \"$1\" \"${1%.js}\".mjs' - '{}' \\;", |
| 79 | + "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", |
75 | 80 | "dev": "npm run demo1",
|
76 | 81 | "demo1": "yarn demo1:seed && nodemon -e js --ignore *test* --exec ./node_modules/.bin/babel-node ./examples/elastic50/index.js",
|
77 | 82 | "demo1:seed": "./node_modules/.bin/babel-node ./examples/elastic50/seedData.js",
|
|
0 commit comments