Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
15ee25a
wip
miklosme Aug 25, 2020
72b5621
use api to compile tailwind.css
miklosme Aug 26, 2020
e4b25d8
wip
miklosme Sep 2, 2020
e44739d
wip output
miklosme Sep 2, 2020
8d52d1b
wip settings
miklosme Sep 2, 2020
6097ce3
add custom config
miklosme Sep 3, 2020
b97e536
setup getStaticProps
miklosme Sep 3, 2020
eb3d1ed
better config management
miklosme Sep 4, 2020
1a6f2bf
merge settings hooks
miklosme Sep 5, 2020
4035051
add SettingsInfo
miklosme Sep 5, 2020
bd58eec
comment
miklosme Sep 5, 2020
20b4ff8
use default config from tailwindcss
miklosme Sep 6, 2020
5f1883f
better output
miklosme Sep 27, 2020
6abc5ff
fix styling
miklosme Sep 27, 2020
4a0fb70
copy()
miklosme Sep 27, 2020
ee9ec0b
update test data
miklosme Sep 27, 2020
689f38f
upgrade css-to-tailwind
miklosme Sep 27, 2020
c61306d
Merge pull request #1 from ritz078/master
miklosme Sep 28, 2020
76f3ba5
Merge remote-tracking branch 'origin/master' into add-variants-suppor…
miklosme Sep 28, 2020
20d5775
upgrade css-to-tailwind
miklosme Sep 28, 2020
ea9790b
bump engines.node to v14
miklosme Sep 28, 2020
9bd69b5
set engines.node to 12.x
miklosme Sep 29, 2020
eaddc00
Merge branch 'master' of github.com:ritz078/transform into add-varian…
miklosme Sep 29, 2020
7fdb3c9
trigger vercel
miklosme Sep 29, 2020
35dd20d
set engines.node to 13.x
miklosme Sep 29, 2020
5d899af
revert
miklosme Sep 29, 2020
e18948d
bump css-to-tailwind version
miklosme Sep 29, 2020
cdf11b3
bump
miklosme Sep 29, 2020
1c1b59d
fix errors
miklosme Sep 29, 2020
78589c0
feedback
miklosme Sep 30, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds

<!-- markdownlint-enable -->
<!-- prettier-ignore-end -->

<!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome!
1 change: 1 addition & 0 deletions components/ConversionPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ const ConversionPanel: React.FunctionComponent<ConversionPanelProps> = function(
setResult(prettyResult);
setMessage("");
} catch (e) {
console.error(e);
setMessage(e.message);
}
toggleUpdateSpinner(false);
Expand Down
8 changes: 7 additions & 1 deletion components/Monaco.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ languages.typescript.typescriptDefaults.setDiagnosticsOptions({
noSyntaxValidation: true
});

languages.css.cssDefaults.setDiagnosticsOptions({
lint: {
unknownAtRules: "ignore"
} as any
});

// @ts-ignore
self.MonacoEnvironment = {
getWorkerUrl: function(_moduleId, label) {
Expand Down Expand Up @@ -165,7 +171,7 @@ export default React.memo(
({
innerRef,
...props
}: MonacoProps & { innerRef: React.RefObject<MonacoEditor> }) => (
}: MonacoProps & { innerRef?: React.RefObject<MonacoEditor> }) => (
<MonacoEditor {...props} ref={innerRef} />
)
);
8 changes: 8 additions & 0 deletions components/NoSSR.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import dynamic from "next/dynamic";
import React from "react";

const NoSSR = props => <React.Fragment>{props.children}</React.Fragment>;

export default dynamic(() => Promise.resolve(NoSSR), {
ssr: false
});
76 changes: 38 additions & 38 deletions constants/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const css2 = `.alert {
position: relative;
padding: 1.6rem 4.6rem;
margin-bottom: 1.6rem;
border: 1px solid #9ae6b4;
border: 1px solid #c53030;
color: #fff;
border-radius: 0.2rem;
width: 100%;
Expand All @@ -58,58 +58,58 @@ export const css2 = `.alert {
justify-content: center;
}

.separator {
background: unset;
.button {
background: #81e6d9;
padding: 1.6rem 4.6rem;
letter-spacing: 0.03rem;
border-radius: 0.2rem;
}

.container {
background: #ffffff;
border: 1px solid #fff5f5;
border-radius: 0.2rem;
.button:hover {
background: #2c7a7b;
}

.header {
font-weight: 400;
font-size: 2rem;
letter-spacing: 0.03rem;
padding: 2.4rem;
border-bottom: 1px solid #fff5f5;
@media (min-width: 640px) {
.button {
padding: 0.5rem 1rem;
width: 100%;
}
}

.footer {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
flex-direction: row-reverse;
padding: 2.4rem 3rem;
border-top: 1px solid #fff5f5;
@media (min-width: 1280px) {
.button {
padding: 3rem 7rem;
margin-bottom: 2.4rem;
}
}

.content--with-side-content {
width: 50%;
.username {
color: #718096;
border-color: #bee3f8;
}

.content--with-separator {
border-right: 1px solid #fff5f5;
.username:focus {
border-color: #3182ce;
}

.content-inner {
width: 100%;
display: flex;
justify-content: center;
flex-direction: column;
margin: 0;
padding: 3rem;
.username::placeholder {
color: #cbd5e0;
}

.side-content {
width: 50%;
background: #425634;
padding: 3rem;
@media (min-width: 1280px) {
.username {
width: 50%;
}
}

.footer {
width: 100%;
display: flex;
justify-content: center;
flex-direction: column;
justify-content: space-between;
align-items: center;
flex-direction: row-reverse;
padding: 2.4rem 3rem;
border-top: 1px solid #fff5f5;
}
`;

Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,12 @@
"@svgr/plugin-jsx": "^5.4.0",
"@types/jsonld": "^1.5.1",
"@walmartlabs/json-to-simple-graphql-schema": "^2.0.3",
"autoprefixer": "^9.8.6",
"babel-plugin-json-to-proptypes": "^0.1.0",
"babel-plugin-object-styles-to-template": "^0.2.2",
"babel-standalone": "^6.26.0",
"clipboard-copy": "^3.1.0",
"css-to-tailwind": "^0.1.3",
"css-to-tailwind": "^1.0.3",
"evergreen-ui": "^4.28.0",
"flowgen": "^1.11.0",
"formik": "^2.1.4",
Expand Down Expand Up @@ -81,6 +82,7 @@
"stringify-object": "^3.3.0",
"svg-to-dataurl": "^1.0.0",
"svgo": "^1.3.2",
"tailwindcss": "^1.7.3",
"tempy": "^0.6.0",
"text-encoding-utf-8": "^1.0.2",
"transform-json-types": "^0.7.0",
Expand Down
12 changes: 12 additions & 0 deletions pages/api/build-tailwind-css.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { NextApiRequest, NextApiResponse } from "next";
import tailwindCss from "@utils/tailwindcss";

export default async (req: NextApiRequest, res: NextApiResponse) => {
try {
const { tailwindConfig, postCssInput } = JSON.parse(req.body);
const css = await tailwindCss(tailwindConfig, postCssInput);
res.status(200).send(css);
} catch (e) {
res.status(500).send(e.message);
}
};
Loading