{"name":"dockerfile-ast","version":"0.0.22","keywords":["ast","abstract","docker","dockerfile","moby","parse","parser","syntax","tree"],"author":{"name":"Remy Suen"},"license":"MIT","_id":"dockerfile-ast@0.0.22","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":"2a10085d9696b24471472ee1a9368020f72d3272","tarball":"http://registry-npm.ywwl.com/dockerfile-ast/download/dockerfile-ast-0.0.22.tgz","fileCount":68,"integrity":"sha512-4ReEd+Qk02GSE1dMxy/5405gn8bCRoVc6PEzgvs2q+iAO/clQ5NIdDjiiTOTETpIT9iEgG0rmAJm4NTm+fmzCQ==","signatures":[{"sig":"MEMCICRdbQU7CAD1penYJjnb6WsIK70Tl6sNYjVTQ3RJoc0yAh9PDzeDLUe90sWkCI6y8ZdXyBWbVzdVCyO02uPwxGNI","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":196192,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeZCvQCRA9TVsSAnZWagAAsJMQAIMSY6Lbu5coJ9/vPWXz\n2YgYHYBxaE65L1RSwRHf2yHgHDHfw6btrQHoHpuLEmHzmBvBG809I9hmUqLO\nQjOzSZ/U8cBcAr4J/s5jH1Pb+KJWXgKuUeWCIw6Odsh8dWi2II14X2pHjEOY\nrgQa/IErRwy94Z/WP2i49Xpyyd6oQFWIQRogsbDMZzJv0fFfYzon7wMcwhwJ\ndTIuhhVQ3sESt/IbRMnLdDBFO92Iqz+adPF1ztjuZY29DnKYmG8ASrhvbNZE\nkEIfnlVaEix27AiYyRae2QM8tC/iC7sJDP9PrT05nLPAT5fMHr3elgMCSJiX\naBDN27eDPw9QdnpPPgy8m++iW4judofOZU/1AZbGk6NY5/8taJ79bEZBGKWL\nlugrLSoppwyeUO03kww70oe9lBO7T5/eR3t9fBXqfoEj0O+LaVb8yHto8C6A\n3AcCj5Ogl/u9d5qspaKvljDRiBimqWEZ5Khi8+9tD+gT1j/DMp7MvTz02ykz\nmk+g7PaCY4/VJQknJyyNkTnVMYZFLyJ07adIFkX5bGWoVQ4FEK1hU2ydr8Or\nfFN/S4/FhfzqSJqJpqlP6VZME6CIw8D7CnlZm1LkQRPLd6lWFV42PnHXARMr\nuvZVTCHwHIj6IYzuBPBqZx7MwNh1FNvtjEAt+9R8MW+1/PmVp/5wnvgZfz7R\nc2rJ\r\n=oQFc\r\n-----END PGP SIGNATURE-----\r\n","size":30080,"noattachment":false,"key":"/dockerfile-ast/-/dockerfile-ast-0.0.22.tgz"},"main":"lib/main.js","engines":{"node":"*"},"gitHead":"fecdafe71fd08bf211a68f20398b8ee48a024f0e","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":"6.9.0","description":"Parse a Dockerfile into an array of instructions and comments.","directories":{},"_nodeVersion":"10.16.3","dependencies":{"vscode-languageserver-types":"^3.15.1"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.0.0","mocha":"^5.2.0","typescript":"~3.7.3","@types/node":"^6.0.52","@types/mocha":"^5.2.0"},"_npmOperationalInternal":{"tmp":"tmp/dockerfile-ast_0.0.22_1583623119574_0.3457068612598182","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":1583623119681,"_cnpm_publish_time":1583623119681,"dist-tags":{"latest":"0.7.1"}}