Skip to content

Commit c86853f

Browse files
committed
updat watchify instructions
1 parent 615b075 commit c86853f

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ One advantage of the node-style structure is that functions/components can be se
2121

2222
2. Run ```npm install```.
2323

24-
3. If editing script files, run ``` watchify main.js -v -o build/main.js ```, leave running to update built file on the fly.
24+
3. If editing script files, cd to the scripts dir and run ``` watchify public/scripts/main.js -v -o public/scripts/build/main.js```, leave running to update built file on the fly. N.B. You will need to intall watchify globally in order to invoke it ```npm install -g watchify```.
2525

2626
4. To view in local browser, run ```npm start```. (Or install nodemon and use that.)
2727

public/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<title>Hello world</title>
4+
<title>Note Taker</title>
55

66
<script src="/scripts/jquery-2.1.3.min.js"></script>
77
<script src="/scripts/bootstrap.min.js"></script>

public/scripts/build/main.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27453,7 +27453,10 @@ var TextEditor = React.createClass({displayName: "TextEditor",
2745327453
render: function(){
2745427454
return(
2745527455
React.createElement("div", {className: "TextEditor col-md-8 col-lg-8 col-sm-8 col-xs-12"},
27456-
React.createElement("textarea", {className: "textarea"})
27456+
React.createElement("input", {type: "text", placeholder: "Post Title", ref: "title"}),
27457+
React.createElement("textarea", {className: "textarea"}),
27458+
React.createElement("input", {type: "text", placeholder: "Your name", ref: "author"}),
27459+
React.createElement("input", {type: "Submit", value: "Submit"})
2745727460
)
2745827461
);
2745927462
}
@@ -27497,7 +27500,7 @@ var IndivNote = React.createClass({displayName: "IndivNote",
2749727500
render: function(){
2749827501
return (
2749927502
React.createElement("li", null,
27500-
React.createElement("p", null, " ", this.props.note.title, " ")
27503+
React.createElement("p", null, " ", this.props.note.text, " ")
2750127504
)
2750227505
);
2750327506
}

public/scripts/main.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ var TextEditor = React.createClass({
1717
render: function(){
1818
return(
1919
<div className="TextEditor col-md-8 col-lg-8 col-sm-8 col-xs-12">
20+
<input type="text" placeholder="Post Title" ref="title" />
2021
<textarea className="textarea"/>
22+
<input type="text" placeholder="Your name" ref="author" />
23+
<input type="Submit" value="Submit" />
2124
</div>
2225
);
2326
}
@@ -61,7 +64,7 @@ var IndivNote = React.createClass({
6164
render: function(){
6265
return (
6366
<li>
64-
<p> {this.props.note.title} </p>
67+
<p> {this.props.note.text} </p>
6568
</li>
6669
);
6770
}

0 commit comments

Comments
 (0)