From 2e00c423253a4790234cfae554aec9c0a10a6f39 Mon Sep 17 00:00:00 2001 From: Naomi Aro Date: Tue, 21 Apr 2015 19:45:32 -0700 Subject: [PATCH] add grunt to project --- Gruntfile.js | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ package.json | 15 +++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 Gruntfile.js create mode 100644 package.json diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 00000000..e96548d8 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,48 @@ +module.exports = function(grunt) { + + // Project configuration. + grunt.initConfig({ + pkg: grunt.file.readJSON('package.json'), + concat: { + options: { + stripBanners: true, + banner: '/*! <%= pkg.name %> <%= pkg.version %>\n' + + 'Written by: <%= pkg.author %>\n' + + 'Website: <%= pkg.website %>\n' + + 'License: <%= pkg.license %> */\n' + }, + dist: { + src: [ + 'js/waveform/observer/observer.js', + 'js/waveform/local_storage.js', + 'js/waveform/config.js', + 'js/waveform/curves.js', + 'js/waveform/track_render.js', + 'js/waveform/fades.js', + 'js/waveform/playout.js', + 'js/waveform/track.js', + 'js/waveform/time_scale.js', + 'js/waveform/controls.js', + 'js/waveform/playlist.js' + ], + dest: 'dist/<%= pkg.name %>.js' + } + }, + uglify: { + options: { + banner: '<%= concat.options.banner %>' + }, + build: { + src: '<%= concat.dist.dest %>', + dest: 'dist/<%= pkg.name %>.min.js' + } + } + }); + + grunt.loadNpmTasks('grunt-contrib-concat'); + grunt.loadNpmTasks('grunt-contrib-uglify'); + + // Default task(s). + grunt.registerTask('default', ['concat', 'uglify']); + +}; \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 00000000..da688996 --- /dev/null +++ b/package.json @@ -0,0 +1,15 @@ +{ + "name": "waveform-playlist", + "description": "Multiple track web audio editor and player with waveform preview", + "version": "0.1.0", + "author": "Naomi Aro", + "license": "MIT", + "website": "http://naomiaro.github.io/waveform-playlist", + "devDependencies": { + "grunt": "~0.4.5", + "grunt-contrib-concat": "^0.5.1", + "grunt-contrib-jshint": "~0.10.0", + "grunt-contrib-nodeunit": "~0.4.1", + "grunt-contrib-uglify": "~0.5.0" + } +}