Permalink
Browse files

Merge branch 'master' of https://github.com/jmagnusson/the-olumpics

Conflicts:
	package.json
  • Loading branch information...
2 parents 91fcb8f + 9aa7183 commit 54a91d2f5b705ccc3b46182e9e4825078dc4f37d @AlexxHansson AlexxHansson committed Feb 22, 2014
View
@@ -0,0 +1,3 @@
+{
+ "directory": "gui/app/bower_components"
+}
File renamed without changes.
File renamed without changes.
View
@@ -3,9 +3,13 @@
## Description
-TODO: Write
+Awesome lumpen game.
## Installation
-TODO: Write
+ $ npm install
+ $ bower install
+ $ gulp
+
+Now you should be able to visit http://127.0.0.1:8089/
@@ -1,5 +1,5 @@
{
- "name": "gui-remake",
+ "name": "the-olumpics",
"version": "0.1.0",
"authors": [
"The Olumpics Team"
@@ -16,7 +16,6 @@
"bootstrap-sass": "git://github.com/twbs/bootstrap-sass.git#~3.1.1",
"bootstrap": "~3.1.1",
"modernizr": "~2.7.1",
- "thorax": "~2.3.2",
"lodash": "~2.4.1"
}
}
@@ -8,11 +8,11 @@
# Set this to the root of your project when deployed:
http_path = '/'
-css_dir = 'dist/styles'
-sass_dir = 'app/styles'
-images_dir = 'app/images'
-javascripts_dir = 'app/scripts'
-fonts_dir = 'app/fonts'
+css_dir = 'gui/dist/styles'
+sass_dir = 'gui/app/styles'
+images_dir = 'gui/app/images'
+javascripts_dir = 'gui/app/scripts'
+fonts_dir = 'gui/app/fonts'
# You can select your preferred output style here (can be overridden via the command line):
# output_style = :expanded or :nested or :compact or :compressed
View
@@ -1,3 +0,0 @@
-{
- "directory": "app/bower_components"
-}
View
@@ -8,6 +8,7 @@
<!-- TODO: Send X-UA-Compatible as HTTP header -->
<!-- <meta http-equiv="X-UA-Compatible" content="IE=edge"> -->
<title>The Olumpics</title>
+ <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="styles/main.css">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
@@ -18,6 +19,7 @@
<!--[if lt IE 8]>
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
+ <h1>The Olumpics</h1>
<script src="scripts/app.js"></script>
</body>
</html>
@@ -0,0 +1,21 @@
+console.log('hey')
+_ = require('lodash')
+io = require('socket.io-client')
+fs = require('fs')
+chooseCharacterTmpl = fs.readFileSync(__dirname + '/templates/choose-character.html')
+
+$app = $('#app')
+
+socket = io.connect('http://194.47.154.230:8080')
+
+socket.on 'give-me-characters', (data) ->
+ characters = data.characters
+ sessionId = data.sessionId
+ $app.html(_.template(chooseCharacterTmpl, {characters: characters}))
+ $('.character-selection .character-btn').on 'click', ->
+ myCharacterId = $(this).val()
+ myCharacter = _.find characters, ((obj) -> return obj.id is myCharacterId)
+ socket.emit 'i-chose-character', {character: myCharacter}
+
+
+socket.on 'new-game-id', (gameId) ->
File renamed without changes.
@@ -1 +0,0 @@
-@import 'compass/css3';
@@ -1,5 +0,0 @@
-body, div {
- background-color: red !important;
-}
-
-.widget {opacity: 0.7}
@@ -1,4 +1 @@
-// @import "compass/css3";
-@import "../bower_components/bootstrap-sass/vendor/assets/stylesheets/bootstrap";
-@import "CSS:./csstest.css"; // TODO: Why not working
@import "general";
View
@@ -1,48 +0,0 @@
-{
- "name": "the-olumpics",
- "version": "0.1.0",
- "author": "The Olumpics Team",
- "browser": {
- "modernizr": "./app/bower_components/modernizr/modernizr.js",
- "thorax": "./app/bower_components/thorax/thorax.js"
- },
- "browserify": {
- "transform": []
- },
- "browserify-shim": "./shim.js",
- "dependencies": {
- "jquery": "~2.1.0",
- "lodash-node": "~2.4.1",
- "handlebars": "~1.3.0",
- "backbone": "~1.1.1"
- },
- "devDependencies": {
- "gulp": "~3.5.0",
- "gulp-util": "~2.2.9",
- "tiny-lr": "~0.0.5",
- "gulp-livereload": "~0.1.1",
- "gulp-autoprefixer": "~0.0.6",
- "gulp-jshint": "~1.3.4",
- "gulp-imagemin": "~0.1.4",
- "gulp-clean": "~0.2.4",
- "gulp-uglify": "~0.2.0",
- "gulp-concat": "~2.1.7",
- "gulp-cache": "~0.1.1",
- "gulp-size": "~0.1.2",
- "gulp-coffeelint": "~0.2.2",
- "gulp-if": "0.0.5",
- "vinyl-source-stream": "~0.1.1",
- "watchify": "~0.6.1",
- "browserify": "~3.30.1",
- "browserify-shim": "~3.2.2",
- "brfs": "~0.2.1",
- "uglifyify": "~1.2.2",
- "gulp-ruby-sass": "~0.3.1",
- "gulp-serve": "~0.1.1",
- "gulp-w3cjs": "~0.1.2",
- "coffeeify": "~0.6.0"
- },
- "engines": {
- "node": ">=0.10.0"
- }
-}
View
@@ -1,6 +0,0 @@
-'use strict';
-
-module.exports = {
- 'modernizr': 'Modernizr',
- 'thorax': {exports: 'Thorax', depends: {'jquery': '$', 'handlebars': 'Handlebars', 'backbone': 'Backbone', 'lodash': '_'}}
-};
@@ -16,8 +16,8 @@ var gulp = require('gulp'),
// TODO: gulp-ruby-sass is much slower. Find a way to support
// bootstrap-sass with libsass. It gives this weird error:
// https://github.com/sindresorhus/grunt-sass/issues/33
- rubysass = require('gulp-ruby-sass'),
- // libsass = require('gulp-sass'),
+ // rubysass = require('gulp-ruby-sass'),
+ libsass = require('gulp-sass'),
// compass = require('gulp-compass'),
clean = require('gulp-clean'),
autoprefixer = require('gulp-autoprefixer'),
@@ -29,7 +29,7 @@ var gulp = require('gulp'),
var SERVER_PORT = 8089,
LIVERELOAD_PORT = 35729;
-var bundler = watchify('./app/scripts/index.coffee');
+var bundler = watchify('./gui/app/scripts/index.coffee');
if (!gutil.env.debug) {
bundler.transform('coffeeify').transform('browserify-shim').transform('brfs').transform('uglifyify');
@@ -40,20 +40,20 @@ if (!gutil.env.debug) {
// STYLES
gulp.task('styles', ['clean-styles'], function () {
- return gulp.src('./app/styles/main.scss')
+ return gulp.src('./gui/app/styles/main.scss')
// TODO: Source maps
- .pipe(rubysass({sourcemap: true,
- compass: true}))
- // .pipe(libsass({errLogToConsole: true,
- // sourceComments: 'map'}))
+ // .pipe(rubysass({sourcemap: true,
+ // compass: true}))
+ .pipe(libsass({errLogToConsole: true,
+ sourceComments: 'map'}))
// autoprefixer sets browser prefixes based on caniuse.com
// statistics.
// TODO: I suspect that running autoprefixer after the sourcemaps
// have been generated might make them a bit off. Look up.
.pipe(autoprefixer('last 2 versions', 'Explorer > 8'))
.pipe(livereload(lrserver))
.pipe(size())
- .pipe(gulp.dest('dist/styles'));
+ .pipe(gulp.dest('gui/dist/styles'));
});
@@ -62,44 +62,44 @@ gulp.task('scripts', ['clean-scripts'], function () {
return bundler.bundle({debug: true})
.pipe(sourcestream('app.js'))
.pipe(livereload(lrserver))
- .pipe(gulp.dest('dist/scripts'));
- // gulp.src('./app/scripts/index.coffee', {'read': false})
+ .pipe(gulp.dest('gui/dist/scripts'));
+ // gulp.src('./gui/app/scripts/index.coffee', {'read': false})
// .pipe(coffeelint())
// .pipe(coffeelint.reporter())
// .pipe(size())
// .pipe(concat('app.js'))
// .pipe(livereload(lrserver))
- // .pipe(gulp.dest('dist/scripts'));
+ // .pipe(gulp.dest('gui/dist/scripts'));
});
// HTML
gulp.task('html-validation', function () {
- gulp.src(['app/*.html', 'app/scripts/templates/*.html'])
+ gulp.src(['gui/app/*.html', 'gui/app/scripts/templates/*.html'])
.pipe(w3cjs());
});
gulp.task('html', ['html-validation', 'clean-html'], function () {
- return gulp.src('app/*.html')
+ return gulp.src('gui/app/*.html')
.pipe(livereload(lrserver))
.pipe(size())
- .pipe(gulp.dest('dist'));
+ .pipe(gulp.dest('gui/dist'));
});
gulp.task('clean-html', function () {
- return gulp.src(['dist/index.html'], {read: false}
+ return gulp.src(['gui/dist/index.html'], {read: false}
).pipe(clean());
});
gulp.task('clean-scripts', function () {
- return gulp.src(['dist/scripts'], {read: false}
+ return gulp.src(['gui/dist/scripts'], {read: false}
).pipe(clean());
});
gulp.task('clean-styles', function () {
- return gulp.src(['dist/styles'], {read: false}
+ return gulp.src(['gui/dist/styles'], {read: false}
).pipe(clean());
});
@@ -123,16 +123,16 @@ gulp.task('watch', ['build'], function () {
if (err) {
console.log(err);
}
- gulp.watch('app/*.html', ['html']);
- gulp.watch('app/styles/*.*', ['styles']);
- gulp.watch('app/scripts/*.*', ['scripts']);
- gulp.watch('app/scripts/templates/*.html', ['scripts']);
+ gulp.watch('gui/app/*.html', ['html']);
+ gulp.watch('gui/app/styles/*.*', ['styles']);
+ gulp.watch('gui/app/scripts/*.*', ['scripts']);
+ gulp.watch('gui/app/scripts/templates/*.html', ['scripts']);
});
gulp.start('serve');
});
gulp.task('serve', serve({
- root: 'dist',
+ root: './gui/dist',
port: SERVER_PORT,
}));
View
@@ -2,14 +2,21 @@
"name": "the-olumpics",
"version": "0.0.1",
"description": "Awesome lumpen game.",
- "main": "app.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "https://github.com/jmagnusson/the-olumpics.git"
},
+ "browser": {
+ "modernizr": "./gui/app/bower_components/modernizr/modernizr.js",
+ "lodash": "./gui/app/bower_components/lodash/dist/lodash.js"
+ },
+ "browserify-shim": "./shim.js",
+ "browserify": {
+ "transform": []
+ },
"author": "",
"license": "BSD-2-Clause",
"bugs": {
@@ -19,5 +26,33 @@
"express": "~3.4.8",
"socket.io": "~0.9.16",
"mysql": "~2.1.0"
+ "jquery": "~2.1.0",
+ "socket.io-client": "~0.9.16"
+ },
+ "devDependencies": {
+ "gulp": "~3.5.0",
+ "gulp-util": "~2.2.9",
+ "tiny-lr": "~0.0.5",
+ "gulp-livereload": "~0.1.1",
+ "gulp-autoprefixer": "~0.0.6",
+ "gulp-jshint": "~1.3.4",
+ "gulp-imagemin": "~0.1.4",
+ "gulp-clean": "~0.2.4",
+ "gulp-uglify": "~0.2.0",
+ "gulp-concat": "~2.1.7",
+ "gulp-cache": "~0.1.1",
+ "gulp-size": "~0.1.2",
+ "gulp-coffeelint": "~0.2.2",
+ "gulp-if": "0.0.5",
+ "vinyl-source-stream": "~0.1.1",
+ "watchify": "~0.6.1",
+ "browserify": "~3.30.1",
+ "browserify-shim": "~3.2.2",
+ "brfs": "~0.2.1",
+ "uglifyify": "~1.2.2",
+ "gulp-sass": "~0.7.1",
+ "gulp-serve": "~0.1.1",
+ "gulp-w3cjs": "~0.1.2",
+ "coffeeify": "~0.6.0"
}
}
View
@@ -0,0 +1,6 @@
+'use strict';
+
+module.exports = {
+ 'modernizr': 'Modernizr',
+ 'lodash': '_'
+};

0 comments on commit 54a91d2

Please sign in to comment.