Skip to content

Commit

Permalink
Gruntfile and package added
Browse files Browse the repository at this point in the history
  • Loading branch information
caducas committed Nov 11, 2013
1 parent 79017ee commit aab030f
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 0 deletions.
51 changes: 51 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
module.exports = function(grunt) {
//Configuration goes here
grunt.initConfig({
jshint: {
all: ['Gruntfile.js', 'src/**/*.js', 'test/**/*.js']
},
// Configure the copy task to move files from the development to production folders
simplemocha: {
options: {
globals: ['should'],
timeout: 3000,
ignoreLeaks: false,
ui: 'bdd',
reporter: 'tap'
},

all: { src: ['test/*.js'] }
},
copy: {
target: {
files: [
{expand: true, src:['**'], dest:'public/', cwd: 'prod/'},
{expand: true, src:['docs/*'], dest:'public/'}]
}
},
uglify: {
my_target: {
src: 'src/**/*.js',
dest: 'prod/build.js'
}
},
yuidoc: {
compile: {
options: {
paths: 'src/',
outdir: 'docs/'
}
}
}
});

//Load Pluins here
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-yuidoc');
grunt.loadNpmTasks('grunt-simple-mocha');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jshint');

//Define your tasks here
grunt.registerTask('default', ['simplemocha', 'jshint', 'uglify', 'yuidoc', 'copy']);
};
16 changes: 16 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "pi-home",
"version": "0.0.1",
"description": "Software to realize home automation with raspberry pi",
"author": "Nikolaus Kofler",
"devDependencies": {
"grunt": "~0.4.1",
"grunt-contrib-copy": "~0.4.1",
"grunt-contrib-yuidoc": "~0.5.0",
"grunt-simple-mocha": "~0.4.0",
"grunt-contrib-uglify": "~0.2.4",
"sinon": "~1.7.3",
"grunt-contrib-jshint": "~0.7.1",
"onoff": "~0.2.3"
}
}

0 comments on commit aab030f

Please sign in to comment.