Permalink
Browse files

Code refactoring and grunt build support work in progress

  • Loading branch information...
1 parent 24bec79 commit 03dedeba91f520722a67edd55f8df6fc73cf8dea @nkashyap committed Aug 27, 2013
Showing with 4,532 additions and 39 deletions.
  1. +64 −0 Gruntfile.js
  2. +2 −0 build.bat
  3. +29 −0 demo/demo.html
  4. +2 −1 demo/index.html
  5. +2 −1 demo/main.js
  6. +1,995 −0 dist/console.io.js
  7. +1 −1 install.bat
  8. +2 −0 npm-publish.bat
  9. +42 −35 package.json
  10. +3 −1 server/main.js
  11. +455 −0 src/client.js
  12. +142 −0 src/console.io.js
  13. +191 −0 src/console.js
  14. +173 −0 src/events.js
  15. +258 −0 src/stacktrace.js
  16. +83 −0 src/storage.js
  17. +144 −0 src/stringify.js
  18. +214 −0 src/transport.js
  19. +383 −0 src/utils.js
  20. +347 −0 src/web.js
View
@@ -0,0 +1,64 @@
+/**
+ * Created with IntelliJ IDEA.
+ * User: nisheeth
+ * Date: 27/08/13
+ * Time: 19:39
+ * To change this template use File | Settings | File Templates.
+ */
+
+module.exports = function (grunt) {
+
+ // Project configuration.
+ grunt.initConfig({
+ pkg: grunt.file.readJSON('package.json'),
+ concat: {
+ dist: {
+ // the files to concatenate
+ src: [
+ 'src/util.js',
+ 'src/storage.js',
+ 'src/events.js',
+ 'src/stringify.js',
+ 'src/stacktrace.js',
+ 'src/transport.js',
+ 'src/console.js',
+ 'src/client.js',
+ 'src/console.io.js'],
+ // the location of the resulting JS file
+ dest: 'dist/<%= pkg.name %>.js'
+ }
+ },
+ uglify: {
+ options: {
+ // the banner is inserted at the top of the output
+ banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n'
+ },
+ dist: {
+ files: {
+ 'dist/<%= pkg.name %>.min.js': ['<%= concat.dist.dest %>']
+ }
+ }
+ },
+ jshint: {
+ // define the files to lint
+ files: ['gruntfile.js', 'src/**/*.js', 'app/**/*.js', 'server/**/*.js'],
+ // configure JSHint (documented at http://www.jshint.com/docs/)
+ options: {
+ // more options here if you want to override JSHint defaults
+ globals: {
+ console: true,
+ module: true
+ }
+ }
+ }
+ });
+
+ grunt.loadNpmTasks('grunt-contrib-uglify');
+ grunt.loadNpmTasks('grunt-contrib-jshint');
+ //grunt.loadNpmTasks('grunt-contrib-qunit');
+ //grunt.loadNpmTasks('grunt-contrib-watch');
+ grunt.loadNpmTasks('grunt-contrib-concat');
+
+ // Default task(s).
+ grunt.registerTask('default', ['concat', 'uglify']);
+};
View
@@ -0,0 +1,2 @@
+grunt default
+pause
View
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <title>Console.IO - Demo HTTP - Test Page</title>
+ <!--<script src="http://www-thedictator.bbdev1.com:8082/socket.io/socket.io.js" type="text/javascript"></script>-->
+ <!--<script src="http://www-thedictator.bbdev1.com:8082/addons/console.js" type="text/javascript"></script>-->
+ <!--<script src="http://www-thedictator.bbdev1.com:8082/addons/socket.js" type="text/javascript"></script>-->
+ <!--<script src="http://www-thedictator.bbdev1.com:8082/addons/inject.js" type="text/javascript"></script>-->
+ <!--<script src="http://www-thedictator.bbdev1.com:8082/addons/inject.js?url=http://www-thedictator.bbdev1.com:8082&web=true" type="text/javascript"></script>-->
+
+ <script src="http://www-thedictator.bbdev1.com:8082/src/bin.js" type="text/javascript"></script>
+
+ <link rel="stylesheet" href="main.css" type="text/css">
+ <script type="text/javascript" src="main.js"></script>
+</head>
+<body>
+<div id="wrapper">
+ <h1 id="ConnectionMode">Info: </h1>
+ <ul id="log"></ul>
+ <div id="debug"></div>
+ <div id="dummy">
+ <div>This</div>
+ <div>is</div>
+ <div>Console.IO Demo</div>
+ </div>
+</div>
+</body>
+</html>
View
@@ -4,7 +4,8 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Console.IO - HTTP - Test Page</title>
- <script src="../addons/inject.js?url=http://localhost:8082&web=true" type="text/javascript"></script>
+ <!--<script src="../addons/inject.js?url=http://localhost:8082&web=true" type="text/javascript"></script>-->
+ <script src="http://localhost:8082/console.io.js" type="text/javascript"></script>
<link rel="stylesheet" href="main.css" type="text/css">
<script type="text/javascript" src="main.js"></script>
View
@@ -64,4 +64,5 @@ function init() {
}, 2000);
}
-window.InjectIO.ready(init);
+//window.InjectIO.ready(init);
+window.ConsoleIO.util.ready(init);
Oops, something went wrong.

0 comments on commit 03dedeb

Please sign in to comment.