Skip to content

Commit c192762

Browse files
committed
webpack progression
1 parent 6ea945d commit c192762

15 files changed

+6088
-50
lines changed

.vscode/launch.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": []
7+
}

nexus/dist/sidebar.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nexus/media/MainSidebarTest.jsx

+9-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React, { Component, render } from 'react';
2-
import parser from '../src/parser/parser.js';
2+
import main from '../src/parser/parser.js';
3+
import test from './test.js';
34
// import Node from 'Nodes.jsx'
45

56
// interface ComponentNode {
@@ -8,7 +9,7 @@ import parser from '../src/parser/parser.js';
89
// props: Object
910
// }
1011

11-
class MainSideBarTest extends Component() {
12+
class MainSideBarTest extends Component {
1213
// pass array down as props to all children
1314
constructor() {
1415
super();
@@ -20,8 +21,11 @@ class MainSideBarTest extends Component() {
2021
}
2122

2223
componentDidMount() {
23-
const res = parser('../src/parser/App.jsx');
24-
console.log(res);
24+
// const res = parser('../src/parser/App.jsx');
25+
// console.log(res);
26+
// console.log(main);
27+
// console.log(test);
28+
console.log(main);
2529
console.log('test string');
2630
const testStr = 'I am a string initialized in componentDidMount';
2731
}
@@ -33,7 +37,7 @@ class MainSideBarTest extends Component() {
3337
console.log('hello');
3438
return (
3539
<div>
36-
<h1>I'm the main sidebar parent</h1>
40+
<h1>I'm the main sidebar parent HELLO</h1>
3741
<div>{testStr}</div>
3842
</div>
3943
);

nexus/media/test.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const test = {name: "testImport"};
2+
3+
4+
5+
module.exports = test;

nexus/out/parser/App.jsx

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
// Example React component for testing parser logic.
2+
3+
import React from 'react';
4+
import { Link } from 'react-router-dom';
5+
import Chatrooms from './components/Chatrooms.jsx';
6+
import Chatroom from './components/Chatroom.jsx';
7+
import styles from './styles.css';
8+
import Children from "./Children.jex";
9+
10+
const URL = "http://google.com";
11+
const NUMBER = 10;
12+
function FUNC() {
13+
console.log('func');
14+
}
15+
const FUNCTWO = () => {
16+
return 2;
17+
}
18+
19+
export async function getStaticProps() {
20+
const allPostsData = 'function';
21+
return {
22+
props: {
23+
allPostsData
24+
}
25+
}
26+
}
27+
28+
const App = (props) => {
29+
const socket = io();
30+
31+
return (
32+
<div>
33+
{/* <button onClick={useRouter}></button> */}
34+
{/* <Chatroom name={'Brian'} otherProp={500}/> */}
35+
{/* <Chatrooms name={'Mike'} otherProp={600}/> */}
36+
<Link href="/dogs"><a>click me for dogs</a></Link>
37+
<Children name={'Brian'} otherProp={500}/>
38+
<Children name={'David'} otherProp={300}/>
39+
<Children name={'Nico'} otherProp={100}/>
40+
<Children name={'Alex'} otherProp={400}/>
41+
<Children name={'Mike'} otherProp={600}/>
42+
<Comp />
43+
<button>HTML Button</button>
44+
</div>
45+
)
46+
};
47+
48+
export default {App, URL};

nexus/out/parser/Children.jsx

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import React from 'react';
2+
import Nested from './Nested.jsx';
3+
4+
const Children = (props) => {
5+
return (
6+
<div>
7+
<Nested />
8+
</div>
9+
)
10+
};
11+
12+
export default Children;

nexus/out/parser/Nested.jsx

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import React from 'react';
2+
3+
const Nested = (props) => {
4+
return (
5+
<div>
6+
<h1></h1>
7+
<p></p>
8+
</div>
9+
)
10+
};
11+
12+
export default Nested;

nexus/out/parser/parser.js

+10-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nexus/out/parser/parser.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nexus/out/test/runTest.js

+26-15
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

nexus/out/test/runTest.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)