{"name":"dockerfile-ast","version":"0.0.8","keywords":["ast","abstract","docker","dockerfile","moby","parse","parser","syntax","tree"],"author":{"name":"Remy Suen"},"license":"MIT","_id":"dockerfile-ast@0.0.8","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":"3c4f1f5fbd802a731b4cbc5a2bcfea5c2a91b161","tarball":"http://registry-npm.ywwl.com/dockerfile-ast/download/dockerfile-ast-0.0.8.tgz","fileCount":68,"integrity":"sha512-sE63aOfhsv5Lg0l0RGMHZEiQQx87ZMb8fSXUj+oHE/e8mhlZPw2sm/0J2VFxsrWPAmlNgzjpnYwX1vr6q+Szbg==","signatures":[{"sig":"MEQCICilEhkqa7AdvlDHBb66j0H8VxbbTBwyHLpcwTImd95QAiAiTlbr+IbgJd+bBmKL3T5YxlbULYICHYlaf7CuQsts9g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":179884,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbCtJMCRA9TVsSAnZWagAA4goP/jbEjiJRi1s6q3yGpzmx\n+RcuckWFiAgelnlQ2PzibnevjamjRqUT1MLTDNhLXgDFz819Q2NfhV4UIaea\nAG4zxN3Os7RcO7NmYVJNewsOj5sF6G6G8qw5gqHqJI/4Mi1dTgzw5GLHfth8\n2G2hhP686rpXSmvZQOm7M1/H1QNBVgp1R8urlFzahbc+wBkkHJlSm/JgMIgp\nAbHyN73LERZXTlVwpcbej1IQZPKoSHkQ1/ZRAprXdmGM3ewi2DXhlBJX9lFY\nM5shYAmtgYnEktUUaBao6ve4AutqCi7dWuAwr/W7dgO9//Rg0YZUrk/5SJF4\nM+M7VGb4bqZfEaLZFU+w3Sy7fDkM3vr+qM3cYYznHVqx6kXQ75/EqiwX935L\nl/66Gzq2JPSzN+WAwV0iXx4KfYWv0GPYzly2c+TVmMBZyd+/QDZywbIhQ6bO\n4HdWez4yMF0O5Mo6K2y2cYyzGbamEukdTYoCql9na++ytUz60WwSaYcLx5SC\nd/EbpZ7sLAyb9IRWZwiRhcGO0TO3kYkyq9dcQU1lDYcwsrT1KJg/3uhLrccA\nweSiAGWC4IB3CsN5p9eBly8gnM296mRNqPg4PAwb9xNFbRnYCpu/IlR6KyeW\n/DLSKgYS4AbkyUffgAh42zMqk0+cCMO5sWypINOyp30N7HF9jKDmvVxfOIc5\nLHsW\r\n=q7G+\r\n-----END PGP SIGNATURE-----\r\n","size":26800,"noattachment":false,"key":"/dockerfile-ast/-/dockerfile-ast-0.0.8.tgz"},"main":"lib/main.js","engines":{"node":"*"},"gitHead":"61abebe9b7b2f013ae9090a9cafe16c926f12c49","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.8_1527435851383_0.019096044692256564","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":1527435851438,"_cnpm_publish_time":1527435851438,"dist-tags":{"latest":"0.7.1"}}