{"name":"dockerfile-ast","version":"0.0.9","keywords":["ast","abstract","docker","dockerfile","moby","parse","parser","syntax","tree"],"author":{"name":"Remy Suen"},"license":"MIT","_id":"dockerfile-ast@0.0.9","maintainers":[{"name":"rcjsuen","email":"remy.suen@gmail.com"}],"homepage":"https://github.com/rcjsuen/dockerfile-ast#readme","bugs":{"url":"https://github.com/rcjsuen/dockerfile-ast/"},"dist":{"shasum":"3f6710566f4cc2c5f9e1a32370681466469e43d6","tarball":"http://registry-npm.ywwl.com/dockerfile-ast/download/dockerfile-ast-0.0.9.tgz","fileCount":68,"integrity":"sha512-vXPvlG+yqdZ4Erk/yGfTMa2/k26a+7xstTaydTxSDA+4In5NYuOdBMr568BDltgOdg0KxFYRu3V7VPYqQ6oXdQ==","signatures":[{"sig":"MEUCIB8bMu8ZQ9Nyl79XqZRu5L1hhG+Yl1cq+giCX1z9WppgAiEAvZv1qOgq65eQJF6iFtN1B2+elgoXhJuwCdjg1RYeHjI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":180401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbDH4ECRA9TVsSAnZWagAA/98P+wZ1jDO4d1UEvvcC8H1k\nOZOnTu4bKGpN7fHxYEVEGloGFOqN0O+Qo3LxC6OA6xj40+oxg1benn/cOw07\n2e+82TDydvvSWit/WNG4uami5X349a2sUFRE0dbXTueAqchKlUA482XNgz/y\n5ZRE6BEYT7CkH7QCe++d0EAohoGh/YoA1uDfgXWXOj3P9J0U//suOroIbeDs\nEowGVqIj1i5h65A5gDMPh6vgvzftbwvPWU/fl7B9y+PXmBxZht8D2+zwbsJO\nrpg/+M83DXT3ZN6jGWZd1JFh9my22UDRpFJkxE+NpymH9oo3Ku/pX7zwEnbl\naXUzPUukZHURquLQm6u5uf6RLAmzdZsa6dbDpuBFOuKdyjAgYLNx0qod56pF\nTMnCJ+htDtYiEFL74G/n6P9N1yeOfm7QDd9sKP8z5Rd7B9OpW17Fz+tfTWw9\n7rziMBLZrsNtTuZGHY+8exg518u/q96fY88ziI+0h5c77ekLiWbS0mXKzA8O\nMbT0bAY7Lt0jq/4ADFlomMEhfhsqV3iLxvBEUCsKRdJ/Rzelu/faB3ybX90j\n2xv96qgkeUejswgRUiUUVm8MQZIL6OFex8RTW/piMkZp2m5pLVj7LSzJOoNR\nrb5N8EPDWnMsIuPA0/0mA+r0lBFh/ffZ5Dg/7/7FWWyCuAhNJ8RBRi0OFsXW\nu7KJ\r\n=oMno\r\n-----END PGP SIGNATURE-----\r\n","size":26903,"noattachment":false,"key":"/dockerfile-ast/-/dockerfile-ast-0.0.9.tgz"},"main":"lib/main.js","engines":{"node":"*"},"gitHead":"bf3341d05663fc8196f76991eb039a2ea1da2e98","scripts":{"nyc":"nyc mocha out/test out/test/instructions","test":"mocha out/test out/test/instructions","build":"tsc -p .","watch":"tsc --watch -p .","nyc-ci":"nyc --cache false mocha out/test out/test/instructions","coverage":"nyc report --reporter=text-lcov | coveralls","prepublish":"tsc -p ./src"},"typings":"./lib/main","_npmUser":{"name":"rcjsuen","email":"remy.suen@gmail.com"},"repository":{"url":"git+https://github.com/rcjsuen/dockerfile-ast.git","type":"git"},"_npmVersion":"5.7.1","description":"Parse a Dockerfile into an array of instructions and comments.","directories":{},"_nodeVersion":"8.9.4","dependencies":{"vscode-languageserver-types":"^3.5.0"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^11.0.2","mocha":"^3.2.0","typescript":"~2.6.1","@types/node":"^6.0.52","@types/mocha":"^2.2.33"},"_npmOperationalInternal":{"tmp":"tmp/dockerfile-ast_0.0.9_1527545347953_0.5154106060450119","host":"s3://npm-registry-packages"},"readme":"# Dockerfile AST\n\n![Node.js Builds](https://github.com/rcjsuen/dockerfile-ast/workflows/Node.js%20Builds/badge.svg?branch=master) [![Coverage Status](https://coveralls.io/repos/github/rcjsuen/dockerfile-ast/badge.svg?branch=master)](https://coveralls.io/github/rcjsuen/dockerfile-ast?branch=master) [![Build Dependencies](https://david-dm.org/rcjsuen/dockerfile-ast.svg)](https://david-dm.org/rcjsuen/dockerfile-ast) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![npm downloads per week](https://img.shields.io/npm/dw/dockerfile-ast.svg)](https://www.npmjs.com/package/dockerfile-ast)\n\nThe `dockerfile-ast` NPM module is a Dockerfile parser written in TypeScript.\nThe module provides full programmatic access to a parsed Dockerfile.\n\nSupported features:\n- escaped newline detection\n  - `escape` parser directive considered when parsing\n- comments preserved\n  - inlined comments in multiline instructions preserved\n- continuous empty newlines honoured (albeit discouraged as of Docker CE 17.09)\n- `ARG` and `ENV` variable lookup and resolution\n\nUnsupported:\n- `\\r` as a a line delimiter\n  - only `\\r\\n` and `\\n` are supported as being line delimiters\n  - if a `\\r` is detected the parser assumes that it is followed by a `\\n`\n\n## Development Instructions\n\nIf you wish to build and compile this project, you must first install [Node.js](https://nodejs.org/en/download/) if you have not already done so.\nAfter you have installed Node.js and cloned the repository with Git, you may now proceed to build and compile the project with the following commands:\n\n```\nnpm install\nnpm run build\nnpm test\n```\n\nIf you are planning to change the code, use `npm run watch` to get the\nTypeScript files transpiled on-the-fly as they are modified.\n\n## Installation Instructions\n\nTo add this library as a dependency to your project, please add `dockerfile-ast` as a dependency in your package.json file.\n\n## Using this Module\n\n```TypeScript\nimport { DockerfileParser } from 'dockerfile-ast';\n\nconst content =\n`FROM alpine\nExposE 8080`\n\nlet dockerfile = DockerfileParser.parse(content);\nlet instructions = dockerfile.getInstructions();\nfor (let instruction of instructions) {\n  // FROM\n  // EXPOSE\n  console.log(instruction.getKeyword());\n  // FROM\n  // ExposE\n  console.log(instruction.getInstruction());\n}\n```\n","publish_time":1527545348106,"_cnpm_publish_time":1527545348106,"dist-tags":{"latest":"0.7.1"}}