{"_id":"@andywer/babel-core-dctypes","_rev":"2-f19f9feb793bb21fd75fcc4d613a384a","name":"@andywer/babel-core-dctypes","description":"Babel compiler core.","dist-tags":{"latest":"7.0.0-alpha.1"},"versions":{"7.0.0-alpha.1":{"name":"@andywer/babel-core-dctypes","version":"7.0.0-alpha.1","description":"Babel compiler core.","author":{"name":"Sebastian McKenzie","email":"sebmck@gmail.com"},"homepage":"https://babeljs.io/","license":"MIT","repository":{"type":"git","url":"https://github.com/babel/babel/tree/master/packages/babel-core"},"keywords":["6to5","babel","classes","const","es6","harmony","let","modules","transpile","transpiler","var","babel-core","compiler"],"scripts":{"bench":"make bench","test":"make test"},"dependencies":{"@andywer/babylon-dctypes":"7.0.0-beta.4","@andywer/babel-traverse-dctypes":"7.0.0-alpha.1","@andywer/babel-types-dctypes":"7.0.0-alpha.1","babel-code-frame":"7.0.0-alpha.1","babel-generator":"7.0.0-alpha.1","babel-helpers":"7.0.0-alpha.1","babel-messages":"7.0.0-alpha.1","babel-template":"7.0.0-alpha.1","babel-register":"7.0.0-alpha.1","convert-source-map":"^1.1.0","debug":"^2.1.1","json5":"^0.5.0","lodash":"^4.2.0","minimatch":"^3.0.2","private":"^0.1.6","slash":"^1.0.0","source-map":"^0.5.0"},"devDependencies":{"babel-helper-fixtures":"7.0.0-alpha.1","babel-helper-transform-fixture-test-runner":"7.0.0-alpha.1","babel-polyfill":"7.0.0-alpha.1"},"_id":"@andywer/babel-core-dctypes@7.0.0-alpha.1","_shasum":"8627ba87b4da5d2dca725fe2b61389f510b45b72","_from":".","_npmVersion":"3.10.3","_nodeVersion":"6.6.0","_npmUser":{"name":"andywer","email":"andy@dev.next-step-software.com"},"dist":{"shasum":"8627ba87b4da5d2dca725fe2b61389f510b45b72","tarball":"https://registry.npmjs.org/@andywer/babel-core-dctypes/-/babel-core-dctypes-7.0.0-alpha.1.tgz","integrity":"sha512-KDeT97Jkb1cRSHW4w+0nCKI58CX5p1AtUJjUe97M1woTQK7hcQPmNOuquKSsjZYh4Zhn2LOnXUrYL7j7qcTXzw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC93lV0n5UBNUW4THMhCKIzlo22wxFRDS1b6n09vZJgMwIhAMYoFq9pzSa04/RJkmmO3zkf38nOlNHLhAf1N4mAadfS"}]},"maintainers":[{"name":"andywer","email":"andy@dev.next-step-software.com"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/babel-core-dctypes-7.0.0-alpha.1.tgz_1489599705293_0.1615915629081428"}}},"readme":"# babel-core\n\n> Babel compiler core.\n\n\n```javascript\nvar babel = require(\"babel-core\");\nimport { transform } from 'babel-core';\nimport * as babel from 'babel-core';\n```\n\nAll transformations will use your local configuration files (.babelrc or in package.json). See [options](#options) to disable it.\n\n## babel.transform(code: string, [options?](#options): Object)\n\nTransforms the passed in `code`. Returning an object with the generated code,\nsource map, and AST.\n\n```js\nbabel.transform(code, options) // => { code, map, ast }\n```\n\n**Example**\n\n```js\nvar result = babel.transform(\"code();\", options);\nresult.code;\nresult.map;\nresult.ast;\n```\n\n## babel.transformFile(filename: string, [options?](#options): Object, callback: Function)\n\nAsynchronously transforms the entire contents of a file.\n\n```js\nbabel.transformFile(filename, options, callback)\n```\n\n**Example**\n\n```js\nbabel.transformFile(\"filename.js\", options, function (err, result) {\n  result; // => { code, map, ast }\n});\n```\n\n## babel.transformFileSync(filename: string, [options?](#options): Object)\n\nSynchronous version of `babel.transformFile`. Returns the transformed contents of\nthe `filename`.\n\n```js\nbabel.transformFileSync(filename, options) // => { code, map, ast }\n```\n\n**Example**\n\n```js\nbabel.transformFileSync(\"filename.js\", options).code;\n```\n\n## babel.transformFromAst(ast: Object, code?: string, [options?](#options): Object)\n\nGiven, an [AST](https://astexplorer.net/), transform it.\n\n```js\nconst code = \"if (true) return;\";\nconst ast = babylon.parse(code, { allowReturnOutsideFunction: true });\nconst { code, map, ast } = babel.transformFromAst(ast, code, options);\n```\n\n## Options\n\n<blockquote class=\"babel-callout babel-callout-info\">\n  <h4>Babel CLI</h4>\n  <p>\n    You can pass these options from the Babel CLI like so:\n  </p>\n  <p>\n    <code>babel --name<span class=\"o\">=</span>value</code>\n  </p>\n</blockquote>\n\nFollowing is a table of the options you can use:\n\n| Option                   | Default              | Description                     |\n| ------------------------ | -------------------- | ------------------------------- |\n| `ast`                    | `true`               | Include the AST in the returned object |\n| `auxiliaryCommentAfter`  | `null`               | Attach a comment after all non-user injected code. |\n| `auxiliaryCommentBefore` | `null`               | Attach a comment before all non-user injected code. |\n| `babelrc`                | `true`               | Specify whether or not to use .babelrc and .babelignore files. Not available when using the CLI, [use `--no-babelrc` instead](https://babeljs.io/docs/usage/cli/#babel-ignoring-babelrc). |\n| `code`                   | `true`               | Enable code generation |\n| `comments`               | `true`               | Output comments in generated output. |\n| `compact`                | `\"auto\"`             | Do not include superfluous whitespace characters and line terminators. When set to `\"auto\"` compact is set to `true` on input sizes of >500KB. |\n| `env`                    | `{}`                 | This is an object of keys that represent different environments. For example, you may have: `{ env: { production: { /* specific options */ } } }` which will use those options when the environment variable `BABEL_ENV` is set to `\"production\"`. If `BABEL_ENV` isn't set then `NODE_ENV` will be used, if it's not set then it defaults to `\"development\"` |\n| `extends`                | `null`               | A path to an `.babelrc` file to extend |\n| `filename`               | `\"unknown\"`          | Filename for use in errors etc. |\n| `filenameRelative`       | `(filename)`         | Filename relative to `sourceRoot`. |\n| `generatorOpts`          | `{}`                 | An object containing the options to be passed down to the babel code generator, babel-generator |\n| `getModuleId`            | `null`               | Specify a custom callback to generate a module id with. Called as `getModuleId(moduleName)`. If falsy value is returned then the generated module id is used. |\n| `highlightCode`          | `true`               | ANSI highlight syntax error code frames |\n| `ignore`                 | `null`               | Opposite to the `only` option. `ignore` is disregarded if `only` is specified. |\n| `inputSourceMap`         | `null`               | A source map object that the output source map will be based on. |\n| `minified`               | `false`              | Should the output be minified (not printing last semicolons in blocks, printing literal string values instead of escaped ones, stripping `()` from `new` when safe) |\n| `moduleId`               | `null`               | Specify a custom name for module ids. |\n| `moduleIds`              | `false`              | If truthy, insert an explicit id for modules. By default, all modules are anonymous. (Not available for `common` modules) |\n| `moduleRoot`             | `(sourceRoot)`       | Optional prefix for the AMD module formatter that will be prepend to the filename on module definitions. |\n| `only`                   | `null`               | A [glob](https://github.com/isaacs/minimatch), regex, or mixed array of both, matching paths to **only** compile. Can also be an array of arrays containing paths to explicitly match. When attempting to compile a non-matching file it's returned verbatim. |\n| `parserOpts`             | `{}`                 | An object containing the options to be passed down to the babel parser, babylon |\n| `plugins`                | `[]`                 | List of [plugins](/docs/plugins/) to load and use. |\n| `presets`                | `[]`                 | List of [presets](/docs/plugins/#presets) (a set of plugins) to load and use. |\n| `retainLines`            | `false`              | Retain line numbers. This will lead to wacky code but is handy for scenarios where you can't use source maps. (**NOTE:** This will not retain the columns) |\n| `resolveModuleSource`    | `null`               | Resolve a module source ie. `import \"SOURCE\";` to a custom value. Called as `resolveModuleSource(source, filename)`. |\n| `shouldPrintComment`     | `null`               | An optional callback that controls whether a comment should be output or not. Called as `shouldPrintComment(commentContents)`. **NOTE:** This overrides the `comment` option when used. |\n| `sourceFileName`         | `(filenameRelative)` | Set `sources[0]` on returned source map. |\n| `sourceMaps`             | `false`              | If truthy, adds a `map` property to returned output. If set to `\"inline\"`, a comment with a sourceMappingURL directive is added to the bottom of the returned code. If set to `\"both\"` then a `map` property is returned as well as a source map comment appended. **This does not emit sourcemap files by itself!** To have sourcemaps emitted using the CLI, you must pass it the `--source-maps` option. |\n| `sourceMapTarget`        | `(filenameRelative)` | Set `file` on returned source map. |\n| `sourceRoot`             | `(moduleRoot)`       | The root from which all sources are relative. |\n| `sourceType`             | `\"module\"`           | Indicate the mode the code should be parsed in. Can be either \"script\" or \"module\". |\n| `wrapPluginVisitorMethod`| `null`               | An optional callback that can be used to wrap visitor methods. **NOTE:** This is useful for things like introspection, and not really needed for implementing anything. Called as `wrapPluginVisitorMethod(pluginAlias, visitorType, callback)`.\n","maintainers":[{"name":"andywer","email":"andy@dev.next-step-software.com"}],"time":{"modified":"2022-06-12T14:41:18.857Z","created":"2017-03-15T17:41:45.983Z","7.0.0-alpha.1":"2017-03-15T17:41:45.983Z"},"homepage":"https://babeljs.io/","keywords":["6to5","babel","classes","const","es6","harmony","let","modules","transpile","transpiler","var","babel-core","compiler"],"repository":{"type":"git","url":"https://github.com/babel/babel/tree/master/packages/babel-core"},"author":{"name":"Sebastian McKenzie","email":"sebmck@gmail.com"},"license":"MIT","readmeFilename":"README.md"}