{"_id":"@allboatsrise/gatsby-transformer-po","_rev":"1-1f1257ecff80ef022f4a1bbc1eb7895d","name":"@allboatsrise/gatsby-transformer-po","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@allboatsrise/gatsby-transformer-po","version":"1.0.0","description":"Gatsby transformer plugin for PO files","contributors":[{"name":"Andrej Pavlovic","email":"apavlovic@allboatsrise.com","url":"https://allboatsrise.com"}],"license":"MIT","main":"index.js","homepage":"https://github.com/allboatsrise/gatsby-transformer-po","repository":{"type":"git","url":"git+https://github.com/allboatsrise/gatsby-transformer-po.git"},"scripts":{"watch":"concurrently --kill-others \"npm:typescript-watch\" \"npm:babel-watch\"","build":"npm run typescript-check && npm run babel-build","babel-build":"babel src --out-dir . --extensions \".ts,.tsx\"","babel-watch":"babel --watch src --out-dir . --extensions \".ts,.tsx\"","typescript-check":"tsc --noEmit","typescript-watch":"tsc --noEmit --watch","clean":"rimraf gatsby-*.js"},"peerDependencies":{"gatsby":"^2.13.0"},"dependencies":{"@babel/runtime":"^7.5.0","pofile":"^1.1.0"},"devDependencies":{"@babel/cli":"^7.5.0","@babel/core":"^7.5.0","@babel/preset-typescript":"^7.3.3","@types/node":"^12.6.9","babel-preset-gatsby-package":"^0.2.0","concurrently":"^4.1.1","rimraf":"^2.6.3","typescript":"^3.5.2"},"engines":{"node":">=10.0.0"},"gitHead":"dd889fda0f2041c6a8f849b6a94a4e0461029ccc","bugs":{"url":"https://github.com/allboatsrise/gatsby-transformer-po/issues"},"_id":"@allboatsrise/gatsby-transformer-po@1.0.0","_nodeVersion":"10.16.1","_npmVersion":"6.10.2","dist":{"integrity":"sha512-vduCBw2tvQjOXaqFbcfYMPMxV3onilI2/TQ/IKNT43dohpqFCtYM3t4kMCFDpj7qzAiLXpW5NLmOyUiVKgk4GQ==","shasum":"87b2f199ca8f2888864016bead9414457d28d1cb","tarball":"https://registry.npmjs.org/@allboatsrise/gatsby-transformer-po/-/gatsby-transformer-po-1.0.0.tgz","fileCount":5,"unpackedSize":6237,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdSaxOCRA9TVsSAnZWagAAOhUP/iPdt/4DgQf28/7lsZUj\nEAxgH4vWY0b3Mby6IYiOF7VdlBbyfMlTjtXiO7Iwfr4kvAJjxwIoy/5Odb+U\nFXzcIVR8hcQLFuN5wXqBdTkyOD6g2JcAjaMyLCSFr81/CxmG6mrpE4ZlRUoK\nb5hTRLHm9dMotWL50ov+I/6SzlcjeooavXmTQNAPLWNOPmk+26sD/Pg2FQ9G\nxSJXycLoxS48mXKSau+T+ImAtWlmAUhJbNevJvIdUg4jWtanEWByIRa1ofaN\n05OY0t4JawAQsGMiTGtJaVfBXLllG8VlaoyYHs9HXwMOhTey1/rdP0DQ1Lja\n4fLRL8wscIvzkFP3cR7rmEtYxkG4QuL0t075p1eRswn45ED1gxXi0/e8t7rZ\ntmeiwSZchVMv5n3HLKiSRvION32ewwcjQlxw/jbtpkuU5FxvKfh0lLu0xwJ2\nmpMo/wnvfLSIEzHFmchkUIJx9S1/S24lNKKwV/FPCcWBMmBrj6aWhp+In/HN\nNwt98X8dotfzMfI58GWHOLwpC2tbXCr9GJfRfdVTDt1lKpoKwIpZ3WyI70fJ\nygRhrmsUweCFLKaxRWbTJT905+zgI0kOZzQ5yW8RhuF5itTPhje/BWCtOLGj\ni0dDij4xc8aHDZTrc0p5Ma2aqLNrvToMd8Y1X7hyDlYVGLiq5IQeOBlStc1Z\nhnG3\r\n=Jx18\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDA9H86Hgd1yfhFjC9iD1gKrDKxxvQ7kYQkHzzSt4v8LQIgZ2I873z57BJvm6dLaP38IjZRYRUSikIgjazkfg+c2Rw="}]},"maintainers":[{"name":"andrejpavlovic","email":"andrej.pavlovic@pokret.org"}],"_npmUser":{"name":"andrejpavlovic","email":"andrej.pavlovic@pokret.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gatsby-transformer-po_1.0.0_1565109325401_0.07360148617715767"},"_hasShrinkwrap":false}},"time":{"created":"2019-08-06T16:35:25.180Z","1.0.0":"2019-08-06T16:35:25.529Z","modified":"2022-04-04T13:31:39.246Z"},"maintainers":[{"name":"andrejpavlovic","email":"andrej.pavlovic@pokret.org"}],"description":"Gatsby transformer plugin for PO files","homepage":"https://github.com/allboatsrise/gatsby-transformer-po","repository":{"type":"git","url":"git+https://github.com/allboatsrise/gatsby-transformer-po.git"},"contributors":[{"name":"Andrej Pavlovic","email":"apavlovic@allboatsrise.com","url":"https://allboatsrise.com"}],"bugs":{"url":"https://github.com/allboatsrise/gatsby-transformer-po/issues"},"license":"MIT","readme":"# gatsby-transformer-po\n\nGatsby transformer plugin for PO files.\n\n## Install\n\n`npm install --save @allboatsrise/gatsby-transformer-po`\n\nNote: You generally will use this plugin together with the [gatsby-source-filesystem](https://www.npmjs.com/package/gatsby-source-filesystem) plugin. gatsby-source-filesystem reads in the files then this plugin transforms the files into data you can query.\n\n## How to use\n\nIf you put your `.po` files in `./src/intl`:\n\n\n```javascript\n// In your gatsby-config.js\nmodule.exports = {\n  plugins: [\n    {\n      resolve: `gatsby-source-filesystem`,\n      options: {\n        name: `data`,\n        path: `${__dirname}/src/intl/`,\n      },\n    },\n    {\n      resolve: '@allboatsrise/gatsby-transformer-po',\n      options: {\n        // Possible values:\n        //   1. `({node: GatsbyApiNode, object: PO}) => string` - callback called for each file expecting locale string to be returned\n        //   2. fixed string (e.g 'en-us') \n        //   3. Dynamically determined from filename: en_US.po => 'en-us' (default)\n        locale: undefined,\n\n        // when true, msgstr is set to first string, otherwise this will be an array of strings\n        forceSingleMsgStr: undefined,\n\n        // used when creating node to define type (default: 'Po')\n        typeName: undefined,\n      }\n    }\n  ]\n}\n```\n\n## How to query\n\nYou'd be able to query your translations like:\n\n```graphql\n{\n  allPo {\n    edges {\n      node {\n        msgid\n        locale\n        msgstr\n        namespace\n      }\n    }\n  }\n}\n```\n\n## Plugin Development\n`npm run watch` - run in background while developing in order to automatically build code when files modified\n`npm run build` - run once to build the code\n`npm run clean` - removes built files","readmeFilename":"README.md"}