Skip to content

Commit 1fb1b51

Browse files
committed
Merge remote-tracking branch 'formidable/master'
2 parents b17f7df + ab4e353 commit 1fb1b51

34 files changed

+2331
-3724
lines changed

.eslintrc

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
{
22
"root": true,
3-
"parser": "babel-eslint",
3+
"parser": "@babel/eslint-parser",
4+
"plugins": [
5+
"prettier"
6+
],
47
"extends": [
5-
"formidable/configurations/es6-react",
6-
"prettier",
7-
"prettier/react"
8+
"eslint:recommended",
9+
"plugin:react/recommended",
10+
"plugin:import/recommended"
811
],
912
"env": {
1013
"browser": true,
@@ -23,7 +26,8 @@
2326
"jsx": true,
2427
"generators": true,
2528
"experimentalObjectRestSpread": true
26-
}
29+
},
30+
"requireConfigFile": false
2731
},
2832
"rules": {
2933
"comma-dangle": "off",
@@ -57,6 +61,7 @@
5761
"filenames/match-regex": "off",
5862
"react/react-in-jsx-scope": "off",
5963
"max-params": ["error", 5],
60-
"max-nested-callbacks": ["error", 5]
64+
"max-nested-callbacks": ["error", 5],
65+
"prettier/prettier": "error"
6166
}
6267
}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ bundle-stats.html
88
.next
99
.out
1010
.history/
11+
stats.html

.prettierrc

Lines changed: 0 additions & 4 deletions
This file was deleted.

.storybook/main.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,13 @@ module.exports = {
55
"addons": [
66
"@storybook/addon-controls",
77
// "@storybook/addon-actions"
8-
]
8+
],
9+
"webpackFinal": async (config) => {
10+
config.module.rules.push({
11+
test: /\.mjs$/,
12+
include: /node_modules/,
13+
type: "javascript/auto",
14+
})
15+
return config
16+
}
917
}

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<br><br>
66
<a href="https://npmjs.com/package/react-live"><img src="https://img.shields.io/npm/dm/react-live.svg"></a>
77
<a href="https://npmjs.com/package/react-live"><img src="https://img.shields.io/npm/v/react-live.svg"></a>
8-
<img src="http://img.badgesize.io/https://unpkg.com/react-live/dist/react-live.min.js?compression=gzip&label=gzip%20size">
9-
<img src="http://img.badgesize.io/https://unpkg.com/react-live/dist/react-live.min.js?label=size">
8+
<img src="https://img.badgesize.io/https://unpkg.com/react-live/dist/react-live.min.js?compression=gzip&label=gzip%20size">
9+
<img src="https://img.badgesize.io/https://unpkg.com/react-live/dist/react-live.min.js?label=size">
1010
<img src="https://img.shields.io/badge/module%20formats-umd%2C%20cjs%2C%20esm-green.svg">
1111
<a href="https://github.com/FormidableLabs/react-live#maintenance-status">
1212
<img alt="Maintenance Status" src="https://img.shields.io/badge/maintenance-active-green.svg" />
@@ -129,7 +129,7 @@ the kind of sizes you will get in a production app. The minified
129129
bundles we publish _exclude_ some dependencies that we depend
130130
on.
131131

132-
<img src="http://img.badgesize.io/https://unpkg.com/react-live/dist/react-live.min.js?compression=gzip&label=gzip%20size">
132+
<img src="https://img.badgesize.io/https://unpkg.com/react-live/dist/react-live.min.js?compression=gzip&label=gzip%20size">
133133

134134
In an actual app when you use `react-live` you will also be bundling
135135
Buble for transpilation, which adds `~135kB` to your bundle. This also
@@ -138,7 +138,7 @@ is rather large as well.
138138

139139
We maintain a fork of Buble which excludes the ESnext Regular Expression
140140
transpilation with removes Buble's large dependency and weighs in at
141-
a smaller size of `~51kB`, which you can find published at [`@philpl/buble`](http://npm.im/@philpl/buble).
141+
a smaller size of `~51kB`, which you can find published at [`@philpl/buble`](https://npm.im/@philpl/buble).
142142

143143
You can alias this in Webpack or the build tool of your choice, which
144144
will reduce the overall bundle size of `react-live` to about `83kB`.

demo/.eslintrc

Lines changed: 0 additions & 7 deletions
This file was deleted.

demo/.eslintrc.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"root": true,
3+
"extends": "next/core-web-vitals"
4+
}

demo/components/LiveEdit.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ const StyledPreview = styled(LivePreview)`
5757
color: black;
5858
height: auto;
5959
overflow: hidden;
60+
text-align: center;
6061
6162
${column};
6263
`;

demo/package.json

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-live-demo",
3-
"version": "1.2.0",
3+
"version": "1.3.0",
44
"private": true,
55
"license": "MIT",
66
"scripts": {
@@ -13,18 +13,17 @@
1313
},
1414
"dependencies": {
1515
"formidable-oss-badges": "^0.3.6",
16-
"next": "11.0.0",
17-
"polished": "^4.1.3",
16+
"next": "12.0.8",
1817
"react": "17.0.2",
1918
"react-dom": "17.0.2",
20-
"react-live": "^2.2.3",
21-
"styled-components": "^5.3.0"
19+
"react-live": "^3.0.0-rc0",
20+
"styled-components": "^5.3.3"
2221
},
2322
"devDependencies": {
2423
"babel-plugin-polished": "^1.1.0",
25-
"babel-plugin-styled-components": "^1.12.0",
26-
"eslint": "7.29.0",
27-
"eslint-config-next": "11.0.0"
24+
"babel-plugin-styled-components": "^2.0.2",
25+
"eslint": "8.7.0",
26+
"eslint-config-next": "12.0.8"
2827
},
2928
"engines": {
3029
"node": ">=12.0.0"

demo/pages/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ const Container = styled.div`
1212
width: ${polished.rem(1024)};
1313
padding: ${polished.rem(20)};
1414
padding-bottom: ${polished.rem(100)};
15-
text-align: center;
1615
`;
1716

1817
const Description = styled.p`
1918
color: ${foreground};
2019
font-size: ${polished.modularScale(1)};
2120
margin-bottom: ${polished.rem(20)};
2221
margin-top: ${polished.rem(50)};
22+
text-align: center;
2323
`;
2424

2525
const componentClassExample = `

0 commit comments

Comments
 (0)