summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatthewsotoudeh <matthewsot@outlook.com>2015-08-21 19:44:27 -0700
committermatthewsotoudeh <matthewsot@outlook.com>2015-08-21 19:44:27 -0700
commitbe8cab5f326231cbfc1347745417c73c5848f570 (patch)
tree25ab3895ceab99f81afa54e701bcb8ca4bdce889
parent96a473e779d20def7760e0063ebea37e20a386b9 (diff)
basic React task/component
-rw-r--r--dist/presentation.js10
-rw-r--r--gulpfile.js5
-rw-r--r--src/presentation/Voir.jsx9
-rw-r--r--src/presentation/demo.html6
-rw-r--r--src/presentation/test.jsx2
-rw-r--r--temp/presentation/pres-con.js9
-rw-r--r--temp/presentation/test.js1
7 files changed, 35 insertions, 7 deletions
diff --git a/dist/presentation.js b/dist/presentation.js
index 8a35685..4c8e361 100644
--- a/dist/presentation.js
+++ b/dist/presentation.js
@@ -1,2 +1,10 @@
var ecrit = ecrit || {};
-alert("hi"); \ No newline at end of file
+var Voir = React.createClass({displayName: "Voir",
+ render: function() {
+ return (
+ React.createElement("div", null,
+ React.createElement("h3", null, "TODO")
+ )
+ );
+ }
+});
diff --git a/gulpfile.js b/gulpfile.js
index a8916c9..3b68374 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -12,7 +12,10 @@ gulp.task('text', function () {
});
gulp.task('presentation-jsx', function () {
- return gulp.src("./src/presentation/**/*.jsx").pipe(react()).pipe(gulp.dest('./temp/presentation/'));
+ return gulp.src("./src/presentation/**/*.jsx")
+ .pipe(react())
+ .pipe(concat("pres-con.js"))
+ .pipe(gulp.dest('./temp/presentation/'));
});
gulp.task('presentation', function () {
diff --git a/src/presentation/Voir.jsx b/src/presentation/Voir.jsx
new file mode 100644
index 0000000..fe347f9
--- /dev/null
+++ b/src/presentation/Voir.jsx
@@ -0,0 +1,9 @@
+var Voir = React.createClass({
+ render: function() {
+ return (
+ <div>
+ <h3>TODO</h3>
+ </div>
+ );
+ }
+});
diff --git a/src/presentation/demo.html b/src/presentation/demo.html
index 4efbc05..02e7471 100644
--- a/src/presentation/demo.html
+++ b/src/presentation/demo.html
@@ -4,10 +4,12 @@
<title>Ecrit Demo</title>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/react/0.13.3/react.min.js"></script>
<script type="text/javascript" src="../../dist/text.js"></script>
+ <script type="text/javascript" src="../../dist/presentation.js"></script>
</head>
<body>
+ <div id="ecrit-mount"></div>
<script>
-
+ React.render(React.createElement(Voir, null), document.getElementById("ecrit-mount"));
</script>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/src/presentation/test.jsx b/src/presentation/test.jsx
deleted file mode 100644
index 100cd48..0000000
--- a/src/presentation/test.jsx
+++ /dev/null
@@ -1,2 +0,0 @@
-alert("hi");
-
diff --git a/temp/presentation/pres-con.js b/temp/presentation/pres-con.js
new file mode 100644
index 0000000..441d6ff
--- /dev/null
+++ b/temp/presentation/pres-con.js
@@ -0,0 +1,9 @@
+var Voir = React.createClass({displayName: "Voir",
+ render: function() {
+ return (
+ React.createElement("div", null,
+ React.createElement("h3", null, "TODO")
+ )
+ );
+ }
+});
diff --git a/temp/presentation/test.js b/temp/presentation/test.js
deleted file mode 100644
index 9528bf0..0000000
--- a/temp/presentation/test.js
+++ /dev/null
@@ -1 +0,0 @@
-alert("hi"); \ No newline at end of file
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback