107 lines
5.0 KiB
JSON
107 lines
5.0 KiB
JSON
{
|
|
"_args": [
|
|
[
|
|
{
|
|
"raw": "babel-plugin-transform-class-properties@^6.5.0",
|
|
"scope": null,
|
|
"escapedName": "babel-plugin-transform-class-properties",
|
|
"name": "babel-plugin-transform-class-properties",
|
|
"rawSpec": "^6.5.0",
|
|
"spec": ">=6.5.0 <7.0.0",
|
|
"type": "range"
|
|
},
|
|
"/home/jdaugherty/work/GT2/GT2-Android/node_modules/babel-preset-react-native"
|
|
]
|
|
],
|
|
"_from": "babel-plugin-transform-class-properties@>=6.5.0 <7.0.0",
|
|
"_id": "babel-plugin-transform-class-properties@6.24.1",
|
|
"_inCache": true,
|
|
"_location": "/babel-plugin-transform-class-properties",
|
|
"_nodeVersion": "6.9.0",
|
|
"_npmOperationalInternal": {
|
|
"host": "packages-18-east.internal.npmjs.com",
|
|
"tmp": "tmp/babel-plugin-transform-class-properties-6.24.1.tgz_1491578371395_0.3040936642792076"
|
|
},
|
|
"_npmUser": {
|
|
"name": "hzoo",
|
|
"email": "hi@henryzoo.com"
|
|
},
|
|
"_npmVersion": "3.10.10",
|
|
"_phantomChildren": {},
|
|
"_requested": {
|
|
"raw": "babel-plugin-transform-class-properties@^6.5.0",
|
|
"scope": null,
|
|
"escapedName": "babel-plugin-transform-class-properties",
|
|
"name": "babel-plugin-transform-class-properties",
|
|
"rawSpec": "^6.5.0",
|
|
"spec": ">=6.5.0 <7.0.0",
|
|
"type": "range"
|
|
},
|
|
"_requiredBy": [
|
|
"/babel-preset-fbjs",
|
|
"/babel-preset-react-native",
|
|
"/react-native"
|
|
],
|
|
"_resolved": "https://registry.npmjs.org/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.24.1.tgz",
|
|
"_shasum": "6a79763ea61d33d36f37b611aa9def81a81b46ac",
|
|
"_shrinkwrap": null,
|
|
"_spec": "babel-plugin-transform-class-properties@^6.5.0",
|
|
"_where": "/home/jdaugherty/work/GT2/GT2-Android/node_modules/babel-preset-react-native",
|
|
"dependencies": {
|
|
"babel-helper-function-name": "^6.24.1",
|
|
"babel-plugin-syntax-class-properties": "^6.8.0",
|
|
"babel-runtime": "^6.22.0",
|
|
"babel-template": "^6.24.1"
|
|
},
|
|
"description": "This plugin transforms static class properties as well as properties declared with the property initializer syntax",
|
|
"devDependencies": {
|
|
"babel-helper-plugin-test-runner": "^6.24.1"
|
|
},
|
|
"directories": {},
|
|
"dist": {
|
|
"shasum": "6a79763ea61d33d36f37b611aa9def81a81b46ac",
|
|
"tarball": "https://registry.npmjs.org/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.24.1.tgz"
|
|
},
|
|
"keywords": [
|
|
"babel-plugin"
|
|
],
|
|
"license": "MIT",
|
|
"main": "lib/index.js",
|
|
"maintainers": [
|
|
{
|
|
"name": "amasad",
|
|
"email": "amjad.masad@gmail.com"
|
|
},
|
|
{
|
|
"name": "hzoo",
|
|
"email": "hi@henryzoo.com"
|
|
},
|
|
{
|
|
"name": "jmm",
|
|
"email": "npm-public@jessemccarthy.net"
|
|
},
|
|
{
|
|
"name": "loganfsmyth",
|
|
"email": "loganfsmyth@gmail.com"
|
|
},
|
|
{
|
|
"name": "sebmck",
|
|
"email": "sebmck@gmail.com"
|
|
},
|
|
{
|
|
"name": "thejameskyle",
|
|
"email": "me@thejameskyle.com"
|
|
}
|
|
],
|
|
"name": "babel-plugin-transform-class-properties",
|
|
"optionalDependencies": {},
|
|
"readme": "# babel-plugin-transform-class-properties\n\n> This plugin transforms es2015 static class properties as well as properties declared with the es2016 property initializer syntax.\n\n## Example\n\nBelow is a class with four class properties which will be transformed.\n\n```js\n class Bork {\n //Property initializer syntax\n instanceProperty = \"bork\";\n boundFunction = () => {\n return this.instanceProperty;\n }\n\n //Static class properties\n static staticProperty = \"babelIsCool\";\n static staticFunction = function() {\n return Bork.staticProperty;\n }\n }\n\n let myBork = new Bork;\n\n //Property initializers are not on the prototype.\n console.log(myBork.prototype.boundFunction); // > undefined\n\n //Bound functions are bound to the class instance.\n console.log(myBork.boundFunction.call(undefined)); // > \"bork\"\n\n //Static function exists on the class.\n console.log(Bork.staticFunction()); // > \"babelIsCool\"\n```\n\n\n## Installation\n\n```sh\nnpm install --save-dev babel-plugin-transform-class-properties\n```\n\n## Usage\n\n### Via `.babelrc` (Recommended)\n\n**.babelrc**\n\n```json\n// without options\n{\n \"plugins\": [\"transform-class-properties\"]\n}\n\n// with options\n{\n \"plugins\": [\n [\"transform-class-properties\", { \"spec\": true }]\n ]\n}\n```\n\n### Via CLI\n\n```sh\nbabel --plugins transform-class-properties script.js\n```\n\n### Via Node API\n\n```javascript\nrequire(\"babel-core\").transform(\"code\", {\n plugins: [\"transform-class-properties\"]\n});\n```\n\n## Options\n\n### `spec`\n\n`boolean`, defaults to `false`.\n\nClass properties are compiled to use `Object.defineProperty`. Static fields are now defined even if they are not initialized.\n\n## References\n\n* [Proposal: ES Class Fields & Static Properties](https://github.com/jeffmo/es-class-static-properties-and-fields)\n",
|
|
"readmeFilename": "README.md",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-class-properties"
|
|
},
|
|
"scripts": {},
|
|
"version": "6.24.1"
|
|
}
|