From fb47bac883ca101b7e41d5f4a4720254e7a62fb5 Mon Sep 17 00:00:00 2001 From: Keivan Beigi Date: Fri, 22 Mar 2013 16:39:08 -0700 Subject: [PATCH] added some sample grunt tasks. --- .gitignore | 1 + Gruntfile.js | 34 ++++++++++++++++++++++++++++++++++ package.json | 22 ++++++++++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 Gruntfile.js create mode 100644 package.json diff --git a/.gitignore b/.gitignore index a5843d69e..089e9c503 100644 --- a/.gitignore +++ b/.gitignore @@ -137,3 +137,4 @@ UpdateLogs/ NzbDrone.Web/* *log.txt siaqodb.lic +node_modules/ diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 000000000..8a3ff379a --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,34 @@ +module.exports = function(grunt) { + + // Project configuration. + grunt.initConfig({ + pkg: grunt.file.readJSON('package.json'), + uglify: { + files: { + expand: true, // Enable dynamic expansion. + cwd: 'NzbDrone.Backbone/', // Src matches are relative to this path. + src: ['**/*.js'], // Actual pattern(s) to match. + dest: 'build/', // Destination path prefix. + ext: '.min.js' // Dest filepaths will have this extension. + } + }, + handlebars: { + options: { + namespace: "NzbDrone.Templates" + }, + files: { + expand: true, // Enable dynamic expansion. + cwd: 'NzbDrone.Backbone/', // Src matches are relative to this path. + src: ['**/*Template.html'], + ext: '.hbs' // Actual pattern(s) to match. + } + }}); + + // Load the plugin that provides the "uglify" task. + grunt.loadNpmTasks('grunt-contrib-uglify'); + grunt.loadNpmTasks('grunt-contrib-handlebars'); + + // Default task(s). + grunt.registerTask('default', ['uglify']); + +}; \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 000000000..5b294aae5 --- /dev/null +++ b/package.json @@ -0,0 +1,22 @@ +{ + "name": "NzbDrone", + "version": "0.0.0", + "description": "NZBDrone\r =====", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git://github.com/NzbDrone/NzbDrone.git" + }, + "author": "", + "license": "BSD", + "gitHead": "9ff7aa1bf7fe38c4c5bdb92f56c8ad556916ed67", + "readmeFilename": "readme.md", + "dependencies": { + "grunt": "*", + "grunt-contrib-uglify": "*", + "grunt-contrib-handlebars": "*" + } +}