-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
React dependencies, gulp tasks, npm package
- Loading branch information
Showing
16 changed files
with
115 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,10 @@ | |
*.sqlite3 | ||
*.sql | ||
|
||
### IntelliJ ### | ||
*.iml | ||
*.ipr | ||
*.iws | ||
.idea/ | ||
.idea | ||
|
||
node_modules | ||
static/dist/js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Django/React skeleton 0.0.1 | ||
## Realtime Slack integration for Django projects using Tornado and React | ||
1. Install python dependencies `sudo pip install -r requirements.txt` | ||
2. Install `sudo npm install` | ||
3. Run `gulp` to compile React code | ||
4. Run `gulp watch` to recompile on auto update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,3 @@ | ||
<script src="//code.jquery.com/jquery-1.11.2.min.js"></script> | ||
<script> | ||
$(document).ready(function () { | ||
$('#main').on('click', function () { | ||
<div id="slack-container"></div> | ||
|
||
} | ||
}); | ||
</script> | ||
|
||
<textarea></textarea> | ||
<br/> | ||
<a href='{% url '' %}'>Connect</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/** @jsx React.DOM */ | ||
|
||
var ChatArea = require('./components/ChatArea'); | ||
var React = require('react'); | ||
|
||
React.renderComponent( | ||
<ChatArea />, | ||
document.getElementById('slack-container') | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/** @jsx React.DOM */ | ||
|
||
var React = require('react'); | ||
|
||
var ChatArea = React.createClass({ | ||
render: function () { | ||
return ( | ||
<div className='chat-wrapper'> | ||
<button>Instantiate connection</button> | ||
<textarea className='chat-frame'></textarea> | ||
</div> | ||
) | ||
} | ||
}); | ||
|
||
module.exports = ChatArea; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
var gulp = require('gulp'); | ||
var browserify = require('gulp-browserify'); | ||
var concat = require('gulp-concat'); | ||
|
||
gulp.task('browserify', function() { | ||
gulp.src('frontend/app.js') | ||
.pipe(browserify({transform: 'reactify'})) | ||
.pipe(concat('main.js')) | ||
.pipe(gulp.dest('static/dist/js')); | ||
}); | ||
|
||
gulp.task('default', ['browserify']); | ||
|
||
gulp.task('watch', function () { | ||
gulp.watch('frontend/**/*.*', ['default']); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"name": "djslack", | ||
"version": "0.0.1", | ||
"description": "Slack integration for Django projects using ReactJS as a view layer.", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/izdi/djslack.git" | ||
}, | ||
"keywords": [ | ||
"python", | ||
"django", | ||
"react", | ||
"tornado" | ||
], | ||
"author": "izdi", | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/izdi/djslack/issues" | ||
}, | ||
"homepage": "https://github.com/izdi/djslack", | ||
"dependencies": { | ||
"gulp": "^3.8.11", | ||
"gulp-browserify": "^0.5.1", | ||
"gulp-concat": "^2.5.2", | ||
"react": "^0.12.2", | ||
"reactify": "^1.0.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from .base import * | ||
|
||
|
||
STATIC_ROOT = '' | ||
STATICFILES_DIRS = (os.path.join(BASE_DIR, 'static'), ) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
backports.ssl-match-hostname==3.4.0.2 | ||
certifi==14.5.14 | ||
Django==1.7.3 | ||
ipdb==0.8 | ||
ipython==2.3.1 | ||
psycopg2==2.5.4 | ||
requests==2.5.1 | ||
tornado==4.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
textarea { | ||
display: block; | ||
} |
Empty file.