@compiled/babel-plugin-css-in-js
Advanced tools
Comparing version 0.1.1-b53bef65f5525dfd06c7f9fbb2dd32f28bb8fbb5.0 to 0.2.0
@@ -22,8 +22,8 @@ "use strict"; | ||
var output = core_1.transformSync("\n import { styled } from '@compiled/css-in-js';\n\n styled.div`\n font-size: 12px;\n `;\n ", babelOpts); | ||
expect((_a = output) === null || _a === void 0 ? void 0 : _a.code).toMatchInlineSnapshot("\n \"import React from \\\"react\\\";\n import { Style, styled } from '@compiled/css-in-js';\n\n props => <><Style hash=\\\"css-1x3e11p\\\">{[\\\".css-1x3e11p{font-size:12px;}\\\"]}</Style><div {...props} className={\\\"css-1x3e11p\\\" + (props.className ? \\\" \\\" + props.className : \\\"\\\")}></div></>;\"\n "); | ||
expect((_a = output) === null || _a === void 0 ? void 0 : _a.code).toMatchInlineSnapshot("\n \"import React from \\\"react\\\";\n import { Style } from '@compiled/css-in-js';\n\n props => <><Style hash=\\\"css-1x3e11p\\\">{[\\\".css-1x3e11p{font-size:12px;}\\\"]}</Style><div {...props} className={\\\"css-1x3e11p\\\" + (props.className ? \\\" \\\" + props.className : \\\"\\\")}></div></>;\"\n "); | ||
}); | ||
it('should transform css prop', function () { | ||
var _a; | ||
var output = core_1.transformSync("\n /** @jsx jsx */\n import { jsx } from '@compiled/css-in-js';\n\n <div css={{ fontSize: 12 }} />\n ", babelOpts); | ||
expect((_a = output) === null || _a === void 0 ? void 0 : _a.code).toMatchInlineSnapshot("\n \"import React from \\\"react\\\";\n /** @jsx jsx */\n\n import { Style, jsx } from '@compiled/css-in-js';\n <><Style hash=\\\"css-1iqe21w\\\">{[\\\".css-1iqe21w{font-size:12px;}\\\"]}</Style><div className=\\\"css-1iqe21w\\\" /></>;\"\n "); | ||
var output = core_1.transformSync("\n import React from 'react';\n import '@compiled/css-in-js';\n\n <div css={{ fontSize: 12 }} />\n ", babelOpts); | ||
expect((_a = output) === null || _a === void 0 ? void 0 : _a.code).toMatchInlineSnapshot("\n \"import React from 'react';\n import { Style } from '@compiled/css-in-js';\n <><Style hash=\\\"css-1iqe21w\\\">{[\\\".css-1iqe21w{font-size:12px;}\\\"]}</Style><div className=\\\"css-1iqe21w\\\" /></>;\"\n "); | ||
}); | ||
@@ -33,5 +33,5 @@ it('should transform classnames component', function () { | ||
var output = core_1.transformSync("\n import { ClassNames } from '@compiled/css-in-js';\n\n <ClassNames>\n {({ css }) => <div className={css({ fontSize: 12 })} />}\n </ClassNames>\n ", babelOpts); | ||
expect((_a = output) === null || _a === void 0 ? void 0 : _a.code).toMatchInlineSnapshot("\n \"import { Style, ClassNames } from '@compiled/css-in-js';\n <><Style hash=\\\"css-2lhdif\\\">{[\\\".css-1iqe21w{font-size:12px;}\\\"]}</Style><div className={\\\"css-1iqe21w\\\"} /></>;\"\n "); | ||
expect((_a = output) === null || _a === void 0 ? void 0 : _a.code).toMatchInlineSnapshot("\n \"import React from \\\"react\\\";\n import { Style } from '@compiled/css-in-js';\n <><Style hash=\\\"css-2lhdif\\\">{[\\\".css-1iqe21w{font-size:12px;}\\\"]}</Style><div className={\\\"css-1iqe21w\\\"} /></>;\"\n "); | ||
}); | ||
}); | ||
//# sourceMappingURL=index.test.js.map |
@@ -1,1 +0,22 @@ | ||
{"name":"@compiled/babel-plugin-css-in-js","version":"0.1.1-b53bef65f5525dfd06c7f9fbb2dd32f28bb8fbb5.0","description":"The CSS in JS authoring experience you love without the runtime cost","author":"Michael Dougall","license":"Apache-2.0","main":"./dist/index.js","types":"./dist/index.d.ts","files":["dist","src"],"dependencies":{"@babel/core":"^7.9.0","@compiled/ts-transform-css-in-js":"0.1.1-b53bef65f5525dfd06c7f9fbb2dd32f28bb8fbb5.0","typescript":"^3.7.3"},"devDependencies":{"@babel/plugin-syntax-jsx":"^7.8.3","@types/babel__core":"^7.1.6"}} | ||
{ | ||
"name": "@compiled/babel-plugin-css-in-js", | ||
"version": "0.2.0", | ||
"description": "The CSS in JS authoring experience you love without the runtime cost", | ||
"author": "Michael Dougall", | ||
"license": "Apache-2.0", | ||
"main": "./dist/index.js", | ||
"types": "./dist/index.d.ts", | ||
"files": [ | ||
"dist", | ||
"src" | ||
], | ||
"dependencies": { | ||
"@babel/core": "^7.9.0", | ||
"@compiled/ts-transform-css-in-js": "0.2.0", | ||
"typescript": "^3.7.3" | ||
}, | ||
"devDependencies": { | ||
"@babel/plugin-syntax-jsx": "^7.8.3", | ||
"@types/babel__core": "^7.1.6" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
9883
+ Added@compiled/ts-transform-css-in-js@0.2.0(transitive)
- Removed@compiled/ts-transform-css-in-js@0.1.1-b53bef65f5525dfd06c7f9fbb2dd32f28bb8fbb5.0(transitive)