- Grunt configured

- first install the dependencies with 'sudo npm install'
- then run with 'grunt'
This commit is contained in:
Adriaan Wormgoor 2013-10-21 15:44:09 +02:00
parent 4ec660fd74
commit 8289c084ca
8 changed files with 772 additions and 618 deletions

142
Gruntfile.js Normal file
View File

@ -0,0 +1,142 @@
/*global module:false*/
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
// Metadata.
pkg: grunt.file.readJSON('package.json'),
banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
'<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' +
'* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */\n',
concat: {
options: {
// separator: ';'
},
dist: {
src: [
'www/js/SettingsWindow.js',
'www/js/d3dServerInterfacing.js',
'www/js/verticalShapes.js',
'www/js/buttonbehaviors.js',
'www/js/canvasDrawing.js',
'www/js/previewRendering.js',
'www/js/gcodeGenerating.js',
'www/js/init_layout.js',
'www/js/Printer.js',
'www/js/Progressbar.js',
'www/js/Thermometer.js',
'www/js/utils.js',
'www/js/sidebar.js',
'www/js/message.js',
'www/js/main.js'
],
dest: 'www/js/<%= pkg.name %>.js'
}
},
uglify: {
options: {
// banner: '/*! <%= pkg.name %> <%= grunt.template.today("yyyy-mm-dd") %> */\n',
mangle: false,
beautify: false,
compress: {},
report: 'min',
preserveComments: 'false'
},
build: {
src: ['www/js/*.js', '!www/js/<%= pkg.name %>.min.js'],
dest: 'www/js/<%= pkg.name %>.min.js'
}
},
jshint: {
options: {
globals: {
jQuery: true
},
browser: true,
curly: true,
eqeqeq: true,
immed: true,
latedef: true,
newcap: true,
noarg: true,
sub: true,
undef: true,
unused: true,
boss: true,
eqnull: true
},
// gruntfile: {
// src: 'Gruntfile.js'
// },
lib_test: {
src: ['www/js/*.js', '!www/js/<%= pkg.name %>.js', '!www/js/<%= pkg.name %>.min.js']
}
},
less: {
development: {
options: {
paths: ["www/css"]
},
files: {
"www/css/styles.css": "less/styles.less"
}
}
},
watch: {
// javascript: {
// files: ["www/js/*", '!www/js/*.min.js'],
// // tasks: ["less", "css_prefix"]
// tasks: ["uglify"]
// },
styles: {
files: ["less/*"],
tasks: ["less", "autoprefixer", "cssmin"]
}
},
autoprefixer: {
options: {
browsers: ['> 1%', 'last 2 versions', 'ie 8', 'ie 9', 'ff 17', 'opera 12.1']
},
// prefix all specified files and save them separately
single_file: {
options: {},
// expand: true,
// flatten: true,
src: 'www/css/styles.css', // -> src/css/file1.css, src/css/file2.css
dest: 'www/css/styles.css' // -> dest/css/file1.css, dest/css/file2.css
}
},
cssmin: {
minify: {
expand: true,
cwd: 'www/css/',
src: ['*.css', '!*.min.css'],
dest: 'www/css/',
ext: '.min.css'
}
}
});
// These plugins provide necessary tasks.
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-autoprefixer');
grunt.loadNpmTasks('grunt-contrib-cssmin');
// Default task.
grunt.registerTask('default', [
'less',
'autoprefixer',
'cssmin',
// 'concat',
// 'uglify',
// 'jshint',
'watch'
]);
};

View File

@ -0,0 +1 @@
Doodle3D client app

View File

@ -5,8 +5,9 @@
*/
body {
background-color: #fcfcfc;
-moz-user-select: none; /* disable cut copy paste */
-webkit-user-select: none; /* disable cut copy paste */
user-select: none; /* disable cut copy paste */
// -moz-user-select: none; /* disable cut copy paste */
// -webkit-user-select: none; /* disable cut copy paste */
overflow:hidden; /* This chops off any overhanging divs */
}
img {

22
package.json Normal file
View File

@ -0,0 +1,22 @@
{
"name": "doodle3dclient",
"version": "0.9.0",
"description": "Doodle3D client app",
"repository": {
"type": "git",
"url": "https://github.com/Doodle3D/doodle3d-client.git"
},
"author": "Peter Uithoven, Adriaan Wormgoor, Rick Companje",
"readmeFilename": "README.md",
"devDependencies": {
"grunt": "~0.4.1",
"grunt-cli": "~0.1.9",
"grunt-contrib-less": "~0.7.0",
"grunt-contrib-watch": "~0.5.3",
"grunt-contrib-uglify": "~0.2.4",
"grunt-contrib-jshint": "~0.6.4",
"grunt-autoprefixer": "~0.4.0",
"grunt-contrib-cssmin": "~0.6.2",
"grunt-contrib-concat": "~0.3.0"
}
}

1
www/css/debug.min.css vendored Normal file
View File

@ -0,0 +1 @@
.debugContainer{position:absolute;top:0;left:0;z-index:500;background-color:#f0f;display:none}#debug_textArea{position:absolute;bottom:0;z-index:500;display:none}.debugBtn{width:25px;height:25px;background-color:#03b;float:left}.agentInfo{background:#fff;border:1px #333 solid;display:none;float:left;opacity:.7}.agentInfoToggle{display:block}#debug_display{position:absolute;top:0;left:0;display:none;background-color:#fff;opacity:.7;color:#000}

1
www/css/settings.min.css vendored Normal file
View File

@ -0,0 +1 @@
form{margin:10px;max-width:600px}form input{margin:1px}body,th,td{font-family:Helvetica,Arial,"Nimbus Sans L",sans-serif;font-size:13px}.settingsContainer{position:relative;width:100%;height:100%}form fieldset{max-width:600px;border:1px solid #bbb;border-radius:5px;-webkit-border-radius:5px;-moz-border-radius:5px;margin-bottom:20px;padding:8px}form fieldset fieldset{max-width:580px;margin:15px 0 5px;clear:left;float:left}form fieldset legend{margin-left:10px;font-weight:700}form label{min-width:150px;display:block;float:left;margin:1px 0 0;clear:left}form div{float:left}form input[type=text],form input[type=number],form input[type=password]{border:1px solid #90c0ff;margin-right:5px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}form input[type=text].small,form input[type=number].small,form input[type=password].small{width:50px}form input[type=text].large,form input[type=number].large,form input[type=password].large{width:250px}form input[type=radio]{margin:4px 4px 0 0}form textarea{border:1px solid #90c0ff;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}form .startgcode_left{float:left;margin-right:20px}form textarea.gcode{width:252px;height:150px}form small{margin:3px 0 0;display:block;clear:left}form .button{display:inline-block}form #passwordLabel,form #password{display:none}form input.error,form textarea.error,form select.error{border:red solid 2px}form .errorMsg{color:red;margin:0 0 0 1em}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long