{"_id":"@davidwu226/relay-compiler-webpack-plugin","_rev":"2-3cfe80d5915070f1b782e2bccc4e261f","name":"@davidwu226/relay-compiler-webpack-plugin","description":"Automatically run the Relay Compiler from Webpack","dist-tags":{"latest":"0.5.2"},"versions":{"0.5.1":{"name":"@davidwu226/relay-compiler-webpack-plugin","version":"0.5.1","description":"Automatically run the Relay Compiler from Webpack","repository":{"type":"git","url":"git+https://github.com/davidwu226/relay-compiler-webpack-plugin.git"},"main":"dist/index.js","jsnext/main":"src/index.js","author":{"name":"Tasveer Singh"},"license":"BSD-3-Clause","scripts":{"clean":"rimraf dist","build":"babel src --out-dir dist","flow":"flow","prepublish":"yarn run flow && yarn run clean && yarn run build"},"peerDependencies":{"graphql":">=0.10.5","relay-compiler":">=1.2.0","webpack":">=2.3.0"},"devDependencies":{"babel-cli":"^6.24.1","babel-core":"^6.24.1","babel-preset-env":"^1.4.0","babel-preset-flow":"^6.23.0","babel-preset-stage-1":"^6.24.1","flow-bin":"^0.44.2","graphql":"^0.9.3","relay-compiler":"^1.2.0","rimraf":"^2.6.1","webpack":"^2.4.1"},"babel":{"presets":[["env",{"targets":{"node":6.1}}],"stage-1","flow"]},"gitHead":"3652ce7a6ebd91f13966a11760d929f71e662daa","bugs":{"url":"https://github.com/davidwu226/relay-compiler-webpack-plugin/issues"},"homepage":"https://github.com/davidwu226/relay-compiler-webpack-plugin#readme","_id":"@davidwu226/relay-compiler-webpack-plugin@0.5.1","_npmVersion":"5.3.0","_nodeVersion":"6.9.1","_npmUser":{"name":"davidwu226","email":"davidwu226.npm@gmail.com"},"dist":{"integrity":"sha512-VdC2xrvaNBduaWkZkK4X7x+6vEDRWYODlMQMYxf8bHh2wQ0qDK5NT11x2BzgIATNDHmk+PewIacT4ZRLoqHm8w==","shasum":"1663b9e486aa6c45f59415bf178eba4c6f711f36","tarball":"https://registry.npmjs.org/@davidwu226/relay-compiler-webpack-plugin/-/relay-compiler-webpack-plugin-0.5.1.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDxyvZsVRY+2tepuXUXzCEyT9Cas1Fc8Iu8u46crc8T7AIgYRsZWiza6iCUSAsxy/LqXNHMlC7kRXj+4kP58YFIMIk="}]},"maintainers":[{"name":"davidwu226","email":"davidwu226.npm@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/relay-compiler-webpack-plugin-0.5.1.tgz_1505324498840_0.9426121623255312"}},"0.5.2":{"name":"@davidwu226/relay-compiler-webpack-plugin","version":"0.5.2","description":"Automatically run the Relay Compiler from Webpack","repository":{"type":"git","url":"git+https://github.com/davidwu226/relay-compiler-webpack-plugin.git"},"main":"dist/index.js","jsnext/main":"src/index.js","author":{"name":"Tasveer Singh"},"license":"BSD-3-Clause","scripts":{"clean":"rimraf dist","build":"babel src --out-dir dist","flow":"flow","prepublish":"yarn run flow && yarn run clean && yarn run build"},"peerDependencies":{"graphql":">=0.10.5","relay-compiler":">=1.2.0","webpack":">=2.3.0"},"devDependencies":{"babel-cli":"^6.24.1","babel-core":"^6.24.1","babel-preset-env":"^1.4.0","babel-preset-flow":"^6.23.0","babel-preset-stage-1":"^6.24.1","flow-bin":"^0.44.2","graphql":"^0.9.3","relay-compiler":"^1.2.0","rimraf":"^2.6.1","webpack":"^2.4.1"},"babel":{"presets":[["env",{"targets":{"node":6.1}}],"stage-1","flow"]},"gitHead":"3652ce7a6ebd91f13966a11760d929f71e662daa","bugs":{"url":"https://github.com/davidwu226/relay-compiler-webpack-plugin/issues"},"homepage":"https://github.com/davidwu226/relay-compiler-webpack-plugin#readme","_id":"@davidwu226/relay-compiler-webpack-plugin@0.5.2","_npmVersion":"5.3.0","_nodeVersion":"6.9.1","_npmUser":{"name":"davidwu226","email":"davidwu226.npm@gmail.com"},"dist":{"integrity":"sha512-FEL9cslYfSF8OXw8+vwBZQ0VTPEAGmS7VVQe5Go+gf48ze31uZYgi7+kyZ5NjpBlZrR0yMf6+l+1QTVnczj46g==","shasum":"eb4f95e80f35de03d554a9e8a10546a8da2c486a","tarball":"https://registry.npmjs.org/@davidwu226/relay-compiler-webpack-plugin/-/relay-compiler-webpack-plugin-0.5.2.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDivAOlNS0ZFxbUcgmgpoTApm9HlkcIRkfyJhBOklO5lAiEAsR00FrWUdiPPWiq7EgtmCpfL1qYBvcqWlv+0B6/u4Hg="}]},"maintainers":[{"name":"davidwu226","email":"davidwu226.npm@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/relay-compiler-webpack-plugin-0.5.2.tgz_1505424851527_0.4564133007079363"}}},"readme":"# Relay Compiler Webpack Plugin\n\nAre you running Relay Modern? Are you annoyed with constantly running the `relay-compiler` to generate code, especially if you're already running Webpack?\n\nWell be annoyed no more! Simply install this plugin to automatically hook into Webpack's build process to generate these files for you.\n\n## Installation\n\n  1. Add this to your project:\n\n```sh\n  yarn add --dev @dhau/relay-compiler-webpack-plugin\n  # Or if you're using npm\n  npm install --save-dev @dhau/relay-compiler-webpack-plugin\n```\n\n  2. Add the plugin to your Webpack configuration:\n  \n```javascript\nconst RelayCompilerWebpackPlugin = require('relay-compiler-webpack-plugin')\nconst path = require('path')\n\nmodule.exports = {\n  // ... Your existing Webpack configuration\n  plugins: [\n    // ...\n    new RelayCompilerWebpackPlugin({\n      schema: path.resolve(__dirname, './relative/path/to/schema.graphql'), // or schema.json\n      src: path.resolve(__dirname, './relative/path/to/source/files'),\n    })\n  ]\n  // ...\n}\n```\n\n  3. :tada:\n\n### Gotchas\n\nIf there are multiple versions of GraphQL in your dependency tree it will cause schema validation errors. To get around\nthis, ensure you have the same graphql version as your relay-compiler version depends on. To assist this you can \n[install dependencies as flat](https://yarnpkg.com/lang/en/docs/cli/install/#toc-yarn-install-flat) which ensures only \none version of each dependency.\n  \n### TODOs\n\nCurrently, the `relay-compiler` is undergoing a lot of work.\nVarious modules required by this library aren't modular enough to truly inject the generated files into Webpack's file hierarchy.\nWe'll be working with the `relay-compiler` to make it more modular in this regard as well as updating this project accordingly.\n\nHowever it is still better than manually running the `relay-compiler` whenever anything changes.\nCurrently Webpack may build a few times once it picks up the files generated by this plugin.\n\n## License\n\nRelay Compiler Webpack Plugin may be redistributed according to the [BSD 3-Clause License](LICENSE).\n\nCopyright 2017, ThusFresh, Inc.\n","maintainers":[{"name":"davidwu226","email":"davidwu226.npm@gmail.com"}],"time":{"modified":"2022-04-05T03:06:29.242Z","created":"2017-09-13T17:41:38.951Z","0.5.1":"2017-09-13T17:41:38.951Z","0.5.2":"2017-09-14T21:34:11.650Z"},"homepage":"https://github.com/davidwu226/relay-compiler-webpack-plugin#readme","repository":{"type":"git","url":"git+https://github.com/davidwu226/relay-compiler-webpack-plugin.git"},"author":{"name":"Tasveer Singh"},"bugs":{"url":"https://github.com/davidwu226/relay-compiler-webpack-plugin/issues"},"license":"BSD-3-Clause","readmeFilename":"README.md"}