From 0903d25a9c868bb7a6afe480729f5686b15de4bc Mon Sep 17 00:00:00 2001 From: Kim Brandwijk Date: Sun, 24 Dec 2017 00:45:23 +0100 Subject: [PATCH] feat: copy GraphQL schema to dist folder close #17 --- package.json | 2 ++ yarn.lock | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 61 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 15b9340..c457dd4 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "prepush": "npm test", "prebuild": "del-cli ./dist", "build": "babel src -d dist", + "postbuild": "cpy ./src/schema.graphql ./dist", "dev": "gramps dev --data-source .", "dev:mock-data": "gramps dev --data-source . --mock", "lint": "eslint src/", @@ -45,6 +46,7 @@ "babel-jest": "^22.0.4", "babel-plugin-inline-import": "^2.0.6", "babel-preset-env": "^1.6.1", + "cpy-cli": "^1.0.1", "cross-env": "^5.1.3", "del-cli": "^1.1.0", "eslint": "^4.13.1", diff --git a/yarn.lock b/yarn.lock index 3382653..dc3739f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1462,6 +1462,18 @@ cosmiconfig@^3.1.0: parse-json "^3.0.0" require-from-string "^2.0.1" +cp-file@^3.1.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/cp-file/-/cp-file-3.2.0.tgz#6f83616254624f0ad58aa4aa8d076f026be7e188" + dependencies: + graceful-fs "^4.1.2" + mkdirp "^0.5.0" + nested-error-stacks "^1.0.1" + object-assign "^4.0.1" + pify "^2.3.0" + pinkie-promise "^2.0.0" + readable-stream "^2.1.4" + cp-file@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/cp-file/-/cp-file-5.0.0.tgz#bc700fd30ca32d24d46c7fb02b992e435fc5a978" @@ -1472,6 +1484,24 @@ cp-file@^5.0.0: pify "^3.0.0" safe-buffer "^5.0.1" +cpy-cli@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/cpy-cli/-/cpy-cli-1.0.1.tgz#67fb5a4a2dec28ca8abff375de4b9e71f6a7561c" + dependencies: + cpy "^4.0.0" + meow "^3.6.0" + +cpy@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/cpy/-/cpy-4.0.1.tgz#b67267eba2f3960ba06a5a61ac94033422833424" + dependencies: + cp-file "^3.1.0" + globby "^4.0.0" + meow "^3.6.0" + nested-error-stacks "^1.0.0" + object-assign "^4.0.1" + pinkie-promise "^2.0.0" + cpy@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/cpy/-/cpy-6.0.0.tgz#0b6888e037bb5a7b02a62249551316208a523253" @@ -2352,6 +2382,16 @@ glob-parent@^2.0.0: dependencies: is-glob "^2.0.0" +glob@^6.0.1: + version "6.0.4" + resolved "https://registry.yarnpkg.com/glob/-/glob-6.0.4.tgz#0f08860f6a155127b2fadd4f9ce24b1aab6e4d22" + dependencies: + inflight "^1.0.4" + inherits "2" + minimatch "2 || 3" + once "^1.3.0" + path-is-absolute "^1.0.0" + glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2: version "7.1.2" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" @@ -2381,6 +2421,17 @@ globals@^9.18.0: version "9.18.0" resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" +globby@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-4.1.0.tgz#080f54549ec1b82a6c60e631fc82e1211dbe95f8" + dependencies: + array-union "^1.0.1" + arrify "^1.0.0" + glob "^6.0.1" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + globby@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" @@ -3823,7 +3874,7 @@ mimic-response@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.0.tgz#df3d3652a73fded6b9b0b24146e6fd052353458e" -minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4: +"minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" dependencies: @@ -3849,7 +3900,7 @@ minizlib@^1.0.4: dependencies: minipass "^2.2.1" -"mkdirp@>=0.5 0", mkdirp@^0.5.1: +"mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" dependencies: @@ -3895,6 +3946,12 @@ nerf-dart@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/nerf-dart/-/nerf-dart-1.0.0.tgz#e6dab7febf5ad816ea81cf5c629c5a0ebde72c1a" +nested-error-stacks@^1.0.0, nested-error-stacks@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/nested-error-stacks/-/nested-error-stacks-1.0.2.tgz#19f619591519f096769a5ba9a86e6eeec823c3cf" + dependencies: + inherits "~2.0.1" + nested-error-stacks@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/nested-error-stacks/-/nested-error-stacks-2.0.0.tgz#98b2ffaefb4610fa3936f1e71435d30700de2840"