@modern-js/entry-generator 1.0.0-rc.2

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/package.json ADDED
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "@modern-js/entry-generator",
3
+ "version": "1.0.0-rc.2",
4
+ "jsnext:source": "./src/index.ts",
5
+ "types": "./dist/types/index.d.ts",
6
+ "main": "./dist/js/node/main.js",
7
+ "module": "./dist/js/treeshaking/index.js",
8
+ "jsnext:modern": "./dist/js/modern/index.js",
9
+ "files": [
10
+ "/templates",
11
+ "/dist/js/node/main.js"
12
+ ],
13
+ "exports": {
14
+ ".": {
15
+ "node": {
16
+ "import": "./dist/js/modern/index.js",
17
+ "require": "./dist/js/node/index.js"
18
+ },
19
+ "default": "./dist/js/treeshaking/index.js"
20
+ }
21
+ },
22
+ "devDependencies": {
23
+ "@babel/runtime": "^7",
24
+ "@modern-js/codesmith": "^1.0.0-rc.3",
25
+ "@modern-js/codesmith-api-app": "^1.0.0-rc.3",
26
+ "@modern-js/codesmith-api-json": "^1.0.0-rc.3",
27
+ "@modern-js/codesmith-tools": "^1.0.0-rc.3",
28
+ "@modern-js/generator-common": "^1.0.0-rc.2",
29
+ "@modern-js/generator-utils": "^1.0.0-rc.2",
30
+ "@modern-js/plugin-i18n": "^1.0.0-rc.2",
31
+ "@types/jest": "^26",
32
+ "@types/lodash": "^4.14.172",
33
+ "@types/node": "^14",
34
+ "lodash": "^4.17.21",
35
+ "typescript": "^4",
36
+ "@modern-js/module-tools": "^1.0.0-rc.2",
37
+ "@modern-js/plugin-testing": "^1.0.0-rc.2"
38
+ },
39
+ "sideEffects": false,
40
+ "modernConfig": {
41
+ "output": {
42
+ "packageMode": "node-js",
43
+ "disableSourceMap": true
44
+ }
45
+ },
46
+ "scripts": {
47
+ "new": "modern new",
48
+ "build": "modern build",
49
+ "build:csmith": "csmith-tools build",
50
+ "test": "modern test --passWithNoTests"
51
+ }
52
+ }
@@ -0,0 +1,5 @@
1
+ const App = () => {
2
+ return <div>Hello Modern.js</div>;
3
+ };
4
+
5
+ export default App;
@@ -0,0 +1,5 @@
1
+ const Index = () => {
2
+ return <div>hello Modern.js</div>;
3
+ };
4
+
5
+ export default Index;
@@ -0,0 +1,16 @@
1
+ import { Switch, Route } from '@modern-js/runtime/router';
2
+
3
+ const App = () => {
4
+ return (
5
+ <Switch>
6
+ <Route exact={true} path="/">
7
+ <div>Hello Modern.js</div>
8
+ </Route>
9
+ <Route path="*">
10
+ <div>404</div>
11
+ </Route>
12
+ </Switch>
13
+ );
14
+ };
15
+
16
+ export default App;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+
3
+ const App: React.FC = () => {
4
+ return <div>Hello Modern.js</div>;
5
+ };
6
+
7
+ export default App;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+
3
+ const Index: React.FC = () => {
4
+ return <div>Hello Modern.js</div>;
5
+ };
6
+
7
+ export default Index;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { Switch, Route } from '@modern-js/runtime/router';
3
+
4
+ const App: React.FC = () => (
5
+ <Switch>
6
+ <Route exact={true} path="/">
7
+ <div>Hello Modern.js</div>
8
+ </Route>
9
+ <Route path="*">
10
+ <div>404</div>
11
+ </Route>
12
+ </Switch>
13
+ );
14
+
15
+ export default App;