From 6dd458907cefee7bb0d051c10317bde457fbb24b Mon Sep 17 00:00:00 2001 From: Ethan Mick Date: Tue, 7 Apr 2015 20:01:14 -0400 Subject: [PATCH] Prepare for conversion. --- .gitignore | 10 ++++- Gruntfile.coffee | 97 ++++++++++++++++++++++++++++++++++++++++++++++++ app/index.html | 0 package.json | 21 +++++++++++ 4 files changed, 127 insertions(+), 1 deletion(-) create mode 100644 Gruntfile.coffee mode change 100755 => 100644 app/index.html diff --git a/.gitignore b/.gitignore index 42b2c72..d157d20 100644 --- a/.gitignore +++ b/.gitignore @@ -24,4 +24,12 @@ build/Release # Dependency directory # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git -node_modules \ No newline at end of file +node_modules +bower_components + +# Debug log from npm +npm-debug.log + +_app +nohup.out +.#nohup.out \ No newline at end of file diff --git a/Gruntfile.coffee b/Gruntfile.coffee new file mode 100644 index 0000000..80aeb97 --- /dev/null +++ b/Gruntfile.coffee @@ -0,0 +1,97 @@ +'use strict' +# +# FastChat +# 2015 +# + +module.exports = (grunt)-> + grunt.initConfig + build: + app: 'app' + compiled: + app: '_app' + pkg: grunt.file.readJSON('package.json') + env: '<% process.env.NODE_ENV %>' + clean: ['<%= build.compiled.app %>'] + copy: + images: + files: [ + { + expand: yes + cwd: '<%= build.app %>/img' + src: ['**/*.{png,jpg,jpeg,gif,svg}'] + dest: '<%= build.compiled.app %>/img' + } + ] + jade: + compile: + options: + client: no + amd: no + namespace: no + pretty: yes + data: '<%= context %>' + files: [ + { + expand: yes + cwd: '<%= build.app %>' + src: ['**/*.jade'] + dest: '<%= build.compiled.app %>' + ext: '.html' + } + ] + coffee: + all: + options: {} + files: [ + { + expand: yes + cwd: '<%= build.app %>' + src: ['**/*.coffee'] + dest: '<%= build.compiled.app %>/' + ext: '.js' + } + ] + less: + all: + options: {} + files: [ + { + expand: yes + cwd: '<%= build.app %>' + src: ['**/*.less'] + dest: '<%= build.compiled.app %>/' + ext: '.css' + } + ] + bower_concat: + all: + dest: '<%= build.compiled.app %>/js/scripts/compiled.js' + cssDest: '<%= build.compiled.app %>/css/compiled.css' + watch: + options: + livereload: yes + jade: + tasks: ['jade'] + files: ['<%= build.app %>/**/*.jade'] + coffee: + tasks: ['coffee'] + files: ['<%= build.app %>/**/*.coffee'] + less: + tasks: ['less'] + files: ['<%= build.app %>/**/*.less'] + images: + tasks: ['copy:images'] + files: ['<%= build.app %>/**/*.{png,svg,jpg,jpeg,gif}'] + + + require('load-grunt-tasks')(grunt) + grunt.registerTask('default', []) + grunt.registerTask 'compile', [ + 'clean' + 'jade' + 'bower_concat' + 'coffee' + 'less' + 'copy:images' + ] diff --git a/app/index.html b/app/index.html old mode 100755 new mode 100644 diff --git a/package.json b/package.json index 3b71c56..2d2f923 100644 --- a/package.json +++ b/package.json @@ -20,5 +20,26 @@ "dependencies" : { }, "devDependencies": { + "bower": "1.3.12", + "chai": "2.1.2", + "coffee-script": "1.9.1", + "coffeelint": "1.9.2", + "coffeelint-use-strict": "0.0.1", + "david": "6.1.5", + "grunt": "0.4.5", + "grunt-bower-concat": "0.4.0", + "grunt-cli": "0.1.13", + "grunt-contrib-clean": "0.6.0", + "grunt-contrib-coffee": "0.12.0", + "grunt-contrib-concat": "0.5.0", + "grunt-contrib-copy": "0.7.0", + "grunt-contrib-jade": "0.14.0", + "grunt-contrib-less": "1.0.0", + "grunt-contrib-uglify": "0.5.0", + "grunt-contrib-watch": "0.6.1", + "load-grunt-tasks": "2.0.0", + "mocha": "2.1.0", + "sinon": "1.10.3", + "travis-cov": "0.2.5" } }