Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy codesandbox example to gh-pages #59

Merged
merged 4 commits into from May 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion next.config.js
Expand Up @@ -2,7 +2,7 @@ const path = require('path');

module.exports = {
webpack: config => {
config.resolve.alias['rifm'] = path.resolve('./dist/rifm.esm.js');
config.resolve.alias['rifm'] = path.resolve('./src/index.js');
return config;
},
};
4 changes: 3 additions & 1 deletion package.json
Expand Up @@ -17,7 +17,9 @@
"jest": "NODE_ICU_DATA=`yarn -s run node-full-icu-path` jest",
"test": "eslint ./ && flow check && yarn test:ts && yarn jest",
"test:ts": "tslint -p tsconfig.json",
"deploy": "yarn next build && yarn next export && gh-pages -d out",
"copy-sandbox-examples": "mkdir -p ./out/codesandboxes && find ./pages -type d -mindepth 1 -maxdepth 1 -exec cp -R \\{\\} ./out/codesandboxes \\;",
"export": "yarn rimraf ./out && yarn next build && yarn next export && yarn copy-sandbox-examples",
"deploy": "yarn export && gh-pages -d out",
"precommit": "lint-staged",
"prepublishOnly": "yarn test && yarn build"
},
Expand Down
10 changes: 5 additions & 5 deletions pages/index.js
Expand Up @@ -85,7 +85,7 @@ const Index = () => {

<EmbedCodesandbox
title="istarkob/rifm: case-enforcement"
href="github/istarkov/rifm/tree/master/pages/case-enforcement"
href="github/istarkov/rifm/tree/gh-pages/codesandboxes/case-enforcement"
/>

<H2 id="number-format">Number format</H2>
Expand All @@ -97,7 +97,7 @@ const Index = () => {

<EmbedCodesandbox
title="istarkob/rifm: number-format"
href="github/istarkov/rifm/tree/master/pages/number-format"
href="github/istarkov/rifm/tree/gh-pages/codesandboxes/number-format"
/>

<H2 id="date-format">Date format</H2>
Expand All @@ -114,7 +114,7 @@ const Index = () => {

<EmbedCodesandbox
title="istarkob/rifm: date-format"
href="github/istarkov/rifm/tree/master/pages/date-format"
href="github/istarkov/rifm/tree/gh-pages/codesandboxes/date-format"
/>

<H2 id="phone-format">Phone format</H2>
Expand All @@ -129,7 +129,7 @@ const Index = () => {

<EmbedCodesandbox
title="istarkob/rifm: phone-format"
href="github/istarkov/rifm/tree/master/pages/phone-format"
href="github/istarkov/rifm/tree/gh-pages/codesandboxes/phone-format"
/>

<H2 id="material-ui">Format Material UI text field</H2>
Expand All @@ -138,7 +138,7 @@ const Index = () => {

<EmbedCodesandbox
title="istarkob/rifm: material-ui"
href="github/istarkov/rifm/tree/master/pages/material-ui"
href="github/istarkov/rifm/tree/gh-pages/codesandboxes/material-ui"
/>
</Container>
);
Expand Down