create-blocklet 0.3.12 → 0.3.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/common/_eslintrc.js +0 -8
- package/package.json +2 -2
- package/templates/react-dapp/src/{app.js → app.jsx} +3 -6
- package/templates/{react-gun-dapp/src/index.js → react-dapp/src/index.jsx} +3 -3
- package/templates/react-dapp/src/pages/{about.js → about.jsx} +2 -3
- package/templates/react-dapp/src/pages/{home.js → home.jsx} +2 -3
- package/templates/react-gun-dapp/src/{app.js → app.jsx} +3 -6
- package/templates/{react-static/src/index.js → react-gun-dapp/src/index.jsx} +3 -3
- package/templates/react-gun-dapp/src/pages/{about.js → about.jsx} +2 -3
- package/templates/react-gun-dapp/src/pages/{home.js → home.jsx} +1 -1
- package/templates/react-static/src/{app.js → app.jsx} +3 -6
- package/templates/{react-dapp/src/index.js → react-static/src/index.jsx} +3 -3
- package/templates/react-static/src/pages/{about.js → about.jsx} +2 -3
- package/templates/react-static/src/pages/{home.js → home.jsx} +2 -3
- package/common/_eslintignore +0 -10
package/common/_eslintrc.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-blocklet",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.13",
|
|
4
4
|
"exports": "./index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": "git@github.com:blocklet/create-blocklet.git",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"prompts": "^2.4.2",
|
|
44
44
|
"semver": "^7.3.7",
|
|
45
45
|
"terminal-link": "^3.0.0",
|
|
46
|
-
"zx": "
|
|
46
|
+
"zx": "6.1.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@arcblock/eslint-config": "0.2.1",
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { BrowserRouter as Router, Routes, Route, Navigate } from 'react-router-dom';
|
|
3
2
|
|
|
4
3
|
import './app.css';
|
|
@@ -18,15 +17,13 @@ function App() {
|
|
|
18
17
|
);
|
|
19
18
|
}
|
|
20
19
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
export default () => {
|
|
20
|
+
export default function WrappedApp() {
|
|
24
21
|
// While the blocklet is deploy to a sub path, this will be work properly.
|
|
25
22
|
const basename = window?.blocklet?.prefix || '/';
|
|
26
23
|
|
|
27
24
|
return (
|
|
28
25
|
<Router basename={basename}>
|
|
29
|
-
<
|
|
26
|
+
<App />
|
|
30
27
|
</Router>
|
|
31
28
|
);
|
|
32
|
-
}
|
|
29
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { StrictMode } from 'react';
|
|
2
2
|
import ReactDOM from 'react-dom/client';
|
|
3
3
|
import App from './app';
|
|
4
4
|
|
|
5
5
|
const root = ReactDOM.createRoot(document.getElementById('root'));
|
|
6
6
|
root.render(
|
|
7
|
-
<
|
|
7
|
+
<StrictMode>
|
|
8
8
|
<App />
|
|
9
|
-
</
|
|
9
|
+
</StrictMode>
|
|
10
10
|
);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { Link } from 'react-router-dom';
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
function About() {
|
|
5
4
|
return (
|
|
6
5
|
<div>
|
|
7
6
|
<h1>
|
|
@@ -12,6 +11,6 @@ const About = () => {
|
|
|
12
11
|
<h2>Hello, i'm a dapp blocklet</h2>
|
|
13
12
|
</div>
|
|
14
13
|
);
|
|
15
|
-
}
|
|
14
|
+
}
|
|
16
15
|
|
|
17
16
|
export default About;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { Link } from 'react-router-dom';
|
|
3
2
|
|
|
4
3
|
import logo from '../logo.svg';
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
function Home() {
|
|
7
6
|
return (
|
|
8
7
|
<header className="app-header">
|
|
9
8
|
<img src={logo} className="app-logo" alt="logo" />
|
|
@@ -18,6 +17,6 @@ const Home = () => {
|
|
|
18
17
|
</a>
|
|
19
18
|
</header>
|
|
20
19
|
);
|
|
21
|
-
}
|
|
20
|
+
}
|
|
22
21
|
|
|
23
22
|
export default Home;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { BrowserRouter as Router, Routes, Route, Navigate } from 'react-router-dom';
|
|
3
2
|
|
|
4
3
|
import './app.css';
|
|
@@ -18,15 +17,13 @@ function App() {
|
|
|
18
17
|
);
|
|
19
18
|
}
|
|
20
19
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
export default () => {
|
|
20
|
+
export default function WrappedApp() {
|
|
24
21
|
// While the blocklet is deploy to a sub path, this will be work properly.
|
|
25
22
|
const basename = window?.blocklet?.prefix || '/';
|
|
26
23
|
|
|
27
24
|
return (
|
|
28
25
|
<Router basename={basename}>
|
|
29
|
-
<
|
|
26
|
+
<App />
|
|
30
27
|
</Router>
|
|
31
28
|
);
|
|
32
|
-
}
|
|
29
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { StrictMode } from 'react';
|
|
2
2
|
import ReactDOM from 'react-dom/client';
|
|
3
3
|
import App from './app';
|
|
4
4
|
|
|
5
5
|
const root = ReactDOM.createRoot(document.getElementById('root'));
|
|
6
6
|
root.render(
|
|
7
|
-
<
|
|
7
|
+
<StrictMode>
|
|
8
8
|
<App />
|
|
9
|
-
</
|
|
9
|
+
</StrictMode>
|
|
10
10
|
);
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { Link } from 'react-router-dom';
|
|
3
2
|
|
|
4
3
|
import logo from '../logo.svg';
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
function About() {
|
|
7
6
|
return (
|
|
8
7
|
<header className="app-header">
|
|
9
8
|
<img src={logo} className="app-logo" alt="logo" />
|
|
@@ -21,6 +20,6 @@ const About = () => {
|
|
|
21
20
|
</a>
|
|
22
21
|
</header>
|
|
23
22
|
);
|
|
24
|
-
}
|
|
23
|
+
}
|
|
25
24
|
|
|
26
25
|
export default About;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { BrowserRouter as Router, Routes, Route, Navigate } from 'react-router-dom';
|
|
3
2
|
|
|
4
3
|
import './app.css';
|
|
@@ -18,15 +17,13 @@ function App() {
|
|
|
18
17
|
);
|
|
19
18
|
}
|
|
20
19
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
export default () => {
|
|
20
|
+
export default function WrappedApp() {
|
|
24
21
|
// While the blocklet is deploy to a sub path, this will be work properly.
|
|
25
22
|
const basename = window?.blocklet?.prefix || '/';
|
|
26
23
|
|
|
27
24
|
return (
|
|
28
25
|
<Router basename={basename}>
|
|
29
|
-
<
|
|
26
|
+
<App />
|
|
30
27
|
</Router>
|
|
31
28
|
);
|
|
32
|
-
}
|
|
29
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { StrictMode } from 'react';
|
|
2
2
|
import ReactDOM from 'react-dom/client';
|
|
3
3
|
import App from './app';
|
|
4
4
|
|
|
5
5
|
const root = ReactDOM.createRoot(document.getElementById('root'));
|
|
6
6
|
root.render(
|
|
7
|
-
<
|
|
7
|
+
<StrictMode>
|
|
8
8
|
<App />
|
|
9
|
-
</
|
|
9
|
+
</StrictMode>
|
|
10
10
|
);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { Link } from 'react-router-dom';
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
function About() {
|
|
5
4
|
return (
|
|
6
5
|
<div>
|
|
7
6
|
<h1>
|
|
@@ -12,6 +11,6 @@ const About = () => {
|
|
|
12
11
|
<h2>Hello, i'm a static blocklet</h2>
|
|
13
12
|
</div>
|
|
14
13
|
);
|
|
15
|
-
}
|
|
14
|
+
}
|
|
16
15
|
|
|
17
16
|
export default About;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { Link } from 'react-router-dom';
|
|
3
2
|
|
|
4
3
|
import logo from '../logo.svg';
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
function Home() {
|
|
7
6
|
return (
|
|
8
7
|
<header className="app-header">
|
|
9
8
|
<img src={logo} className="app-logo" alt="logo" />
|
|
@@ -18,6 +17,6 @@ const Home = () => {
|
|
|
18
17
|
</a>
|
|
19
18
|
</header>
|
|
20
19
|
);
|
|
21
|
-
}
|
|
20
|
+
}
|
|
22
21
|
|
|
23
22
|
export default Home;
|