{
  "_args": [
    [
      {
        "raw": "babel-plugin-debug-macros@^0.1.11",
        "scope": null,
        "escapedName": "babel-plugin-debug-macros",
        "name": "babel-plugin-debug-macros",
        "rawSpec": "^0.1.11",
        "spec": ">=0.1.11 <0.2.0",
        "type": "range"
      },
      "/home/travis/build/lukesargeant/ember-sparkline/node_modules/ember-cli-babel"
    ]
  ],
  "_from": "babel-plugin-debug-macros@>=0.1.11 <0.2.0",
  "_id": "babel-plugin-debug-macros@0.1.11",
  "_inCache": true,
  "_location": "/babel-plugin-debug-macros",
  "_nodeVersion": "8.1.2",
  "_npmOperationalInternal": {
    "host": "s3://npm-registry-packages",
    "tmp": "tmp/babel-plugin-debug-macros-0.1.11.tgz_1499309697177_0.7240045694634318"
  },
  "_npmUser": {
    "name": "rwjblue",
    "email": "me@rwjblue.com"
  },
  "_npmVersion": "5.0.3",
  "_phantomChildren": {},
  "_requested": {
    "raw": "babel-plugin-debug-macros@^0.1.11",
    "scope": null,
    "escapedName": "babel-plugin-debug-macros",
    "name": "babel-plugin-debug-macros",
    "rawSpec": "^0.1.11",
    "spec": ">=0.1.11 <0.2.0",
    "type": "range"
  },
  "_requiredBy": [
    "/ember-cli-babel",
    "/ember-resolver"
  ],
  "_resolved": "https://registry.npmjs.org/babel-plugin-debug-macros/-/babel-plugin-debug-macros-0.1.11.tgz",
  "_shasum": "6c562bf561fccd406ce14ab04f42c218cf956605",
  "_shrinkwrap": null,
  "_spec": "babel-plugin-debug-macros@^0.1.11",
  "_where": "/home/travis/build/lukesargeant/ember-sparkline/node_modules/ember-cli-babel",
  "bugs": {
    "url": "https://github.com/chadhietala/babel-debug-macros/issues"
  },
  "contributors": [
    {
      "name": "Chad Hietala",
      "email": "chadhietala@gmail.com"
    },
    {
      "name": "Kris Selden",
      "email": "kris.selden@gmail.com"
    },
    {
      "name": "Robert Jackson",
      "email": "rwjblue@gmail.com"
    }
  ],
  "dependencies": {
    "semver": "^5.3.0"
  },
  "description": "Debug macros and feature flag stripping",
  "devDependencies": {
    "babel-cli": "^6.22.2",
    "babel-core": "^6.22.1",
    "babel-preset-env": "^1.2.2",
    "babel-preset-latest": "^6.24.0",
    "babel-register": "^6.22.0",
    "chai": "^3.5.0",
    "chai-files": "^1.4.0",
    "mocha": "^3.2.0"
  },
  "directories": {},
  "dist": {
    "integrity": "sha512-hZw5qNNGAR02Y+yBUrtsnJHh8OXavkayPRqKGAXnIm4t5rWVpj3ArwsC7TWdpZsBguQvHAeyTxZ7s23yY60HHg==",
    "shasum": "6c562bf561fccd406ce14ab04f42c218cf956605",
    "tarball": "https://registry.npmjs.org/babel-plugin-debug-macros/-/babel-plugin-debug-macros-0.1.11.tgz"
  },
  "files": [
    "dist/",
    "!dist/tests"
  ],
  "gitHead": "5adb01cab6a68b9505301455592e523593c9ebc5",
  "homepage": "https://github.com/chadhietala/babel-debug-macros#readme",
  "keywords": [
    "babel",
    "plugin"
  ],
  "license": "MIT",
  "main": "dist/index.js",
  "maintainers": [
    {
      "name": "chadhietala",
      "email": "chadhietala@gmail.com"
    },
    {
      "name": "rwjblue",
      "email": "me@rwjblue.com"
    }
  ],
  "name": "babel-plugin-debug-macros",
  "optionalDependencies": {},
  "readme": "# Babel Debug Macros And Feature Flags\n\nThis provides debug macros and feature flagging.\n\n## Setup\n\nThe plugin takes 5 types options: `envFlags`, `features`, `debugTools`, `externalizeHelpers` and `svelte`. The `importSpecifier` is used as a hint to this plugin as to where macros are being imported and completely configurable by the host. Like Babel you can supply your own helpers using the `externalizeHelpers` options.\n\n```\n{\n  plugins: [\n    ['babel-debug-macros', {\n      // @required\n      envFlags: {\n        source: '@ember/env-flags',\n        flags: { DEBUG: true }\n      },\n      // @required\n      debugTools: {\n        source: 'debug-tools',\n        // @optional\n        assertPredicateIndex: 0\n      },\n      // @optional\n      features: {\n        name: 'ember-source',\n        source: '@ember/features',\n        flags: { FEATURE_A: false, FEATURE_B: true, DEPRECATED_CONTROLLERS: \"2.12.0\" }\n      },\n      // @optional\n      svelte: {\n        'ember-source': \"2.15.0\"\n      },\n      // @optional\n      externalizeHelpers: {\n        module: true,\n        // global: '__my_global_ns__'\n      }\n    }]\n  ]\n}\n```\n\nFlags and features are inlined into the consuming module so that something like UglifyJS will DCE them when they are unreachable.\n\n## Simple environment and fetaure flags\n\n```javascript\nimport { DEBUG } from '@ember/env-flags';\nimport { FEATURE_A, FEATURE_B } from '@ember/features';\n\nif (DEBUG) {\n  console.log('Hello from debug');\n}\n\nlet woot;\nif (FEATURE_A) {\n  woot = () => 'woot';\n} else if (FEATURE_B) {\n  woot = () => 'toow';\n}\n\nwoot();\n```\n\nTransforms to:\n\n```javascript\nif (true) {\n  console.log('Hello from debug');\n}\n\nlet woot;\nif (false) {\n  woot = () => 'woot';\n} else if (true) {\n  woot = () => 'toow';\n}\n\nwoot();\n```\n\n## `warn` macro expansion\n\n```javascript\nimport { warn } from 'debug-tools';\n\nwarn('this is a warning');\n```\n\nExpands into:\n\n```javascript\n(true && console.warn('this is a warning'));\n```\n\n## `assert` macro expansion\n\nThe `assert` macro can expand in a more intelligent way with the correct\nconfiguration. When `babel-plugin-debug-macros` is provided with the\n`assertPredicateIndex` the predicate is injected in front of the assertion\nin order to avoid costly assertion message generation when not needed.\n\n```javascript\nimport { assert } from 'debug-tools';\n\nassert((() => {\n  return 1 === 1;\n})(), 'You bad!');\n```\n\nWith the `debugTools: { assertPredicateIndex: 0 }` configuration the following expansion is done:\n\n```js\n(true && !((() => { return 1 === 1;})()) && console.assert(false, 'this is a warning'));\n```\n\nWhen `assertPredicateIndex` is not specified, the following expansion is done:\n\n```javascript\n(true && console.assert((() => { return 1 === 1;})(), 'this is a warning'));\n```\n\n## `deprecate` macro expansion\n\n```javascript\nimport { deprecate } from 'debug-tools';\n\nlet foo = 2;\n\ndeprecate('This is deprecated.', foo % 2);\n```\n\nExpands into:\n\n```javascript\nlet foo = 2;\n\n(true && !(foo % 2) && console.warn('This is deprecated.'));\n```\n\n## Externalized Helpers\n\nWhen you externalize helpers you must provide runtime implementations for the above macros. An expansion will still occur, however we will emit references to those runtime helpers.\n\nA global expansion looks like the following:\n\n```javascript\nimport { warn } from 'debug-tools';\n\nwarn('this is a warning');\n```\n\nExpands into:\n\n```javascript\n(true && Ember.warn('this is a warning'));\n```\n\nWhile externalizing the helpers to a module looks like the following:\n\n```javascript\nimport { warn } from 'debug-tools';\n\nwarn('this is a warning');\n```\n\nExpands into:\n\n```javascript\n(true && warn('this is a warning'));\n```\n\n# Svelte\n\nSvelte allows for consumers to opt into stripping deprecated code from your dependecies. By adding a package name and minimum version that contains no deprecations, that code will be compiled away.\n\nFor example, consider you are on `ember-source@2.10.0` and you have no deprecations. All deprecated code in `ember-source` that is `<=2.10.0` will be removed.\n\n```\n...\nsvelte: {\n  \"ember-source\": \"2.10.0\"\n}\n...\n```\n\nNow if you bump to `ember-source@2.11.0` you may encounter new deprecations. The workflow would then be to clear out all deprecations and then bump the version in the `svelte` options.\n\n```\nsvelte: {\n  \"ember-source\": \"2.11.0\"\n}\n```\n\n# Hygenic\n\nAs you may notice that we inject `DEBUG` into the code when we expand the macro. We guarantee that the binding is unique when injected and follow the local binding name if it is imported directly.\n",
  "readmeFilename": "README.md",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/chadhietala/babel-debug-macros.git"
  },
  "scripts": {
    "build": "babel src --out-dir dist",
    "prepublish": "babel src --out-dir dist",
    "test": "babel src --out-dir dist && mocha dist/tests/**-test.js"
  },
  "version": "0.1.11"
}
