Skip to content

Commit

Permalink
Merge pull request #4 from acidhax/feature/poop
Browse files Browse the repository at this point in the history
Feature/refactor
  • Loading branch information
matbee-eth committed Dec 11, 2015
2 parents 6dd6bd0 + db7b788 commit f1ba232
Show file tree
Hide file tree
Showing 19 changed files with 630 additions and 161 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
node_modules/
node_modules/
build
dist/
.DS_Store
bin/ffmpeg
161 changes: 161 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
var electron = require('electron-prebuilt');
var packagejson = require('./package.json');
var tail = process.platform;
if (process.platform == 'darwin') {
tail += "-x64";
} else {
tail += "-ia32"
}
module.exports = function(grunt) {
require('load-grunt-tasks')(grunt);

var APP_NAME = "audio-cast";
var APP_VERSION = packagejson.version;

grunt.initConfig({
copy: {
dev: {
files: [{
expand: true,
cwd: '.',
src: ['package.json'],
dest: 'build/'
}, {
cwd: 'src/',
expand: true,
src: ['**/*.png'],
dest: 'build'
}, {
expand: true,
cwd: 'bin/',
src: ['**/*'],
dest: 'build/resources/bin/'
}]
},
depsWindows: {
files: [{
expand: true,
cwd: 'bin/',
src: ['**/*'],
dest: 'dist/' + APP_NAME + '-'+tail+'/resources/bin/'
}]
},
node_modules: {
files: [{
cwd: 'node_modules/',
src: Object.keys(packagejson.dependencies).map(function(dep) {
return dep + '/**/*';
}),
dest: 'build/node_modules/',
expand: true
}]
},
release: {
files: [{
cwd: 'node_modules/',
src: Object.keys(packagejson.dependencies).map(function(dep) {
return dep + '/**/*';
}),
dest: 'dist/' + APP_NAME + '-'+tail+'/node_modules/',
expand: true
}, {
expand: true,
cwd: '.',
src: ['package.json'],
dest: 'dist/' + APP_NAME + '-'+tail+'/',
}, {
cwd: 'src/',
expand: true,
src: ['*.png'],
dest: 'dist/' + APP_NAME + '-'+tail+'/',
}]
}
},
babel: {
options: {
plugins: ['transform-minify-booleans', 'transform-property-literals', 'transform-simplify-comparison-operators', 'transform-merge-sibling-variables'],
presets: ['es2015'],
compact: false,
comments: false
},
build: {
files: [{
expand: true,
cwd: 'src/',
src: ['**/*.js'],
dest: 'build'
}]
},
dist: {
files: [{
expand: true,
cwd: 'src/',
src: ['**/*.js'],
dest: 'dist/' + APP_NAME + '-'+tail
}]
}
},
shell: {
electron: {
command: electron + ' . ' + (grunt.option('dev') ? '--dev' : ''),
options: {
async: false,
execOptions: {
cwd: 'build'
}
}
}
},
clean: {
build: ['build/'],
release: ['dist/']
},
ffmpeg_libs: {
options: {
dir: 'bin/ffmpeg/' + process.platform,
force: true,
arch: (process.platform === 'win32') ? 'ia32' : 'x64',
platform: (process.platform === 'win32') ? 'win' : 'osx'
}
},
electron: {
windows: {
options: {
name: APP_NAME,
dir: 'build/',
out: 'dist',
version: packagejson['optionalDependencies']['electron-prebuilt'],
platform: process.platform,
arch: process.platform == 'darwin' ? 'x64' : 'ia32',
prune: true,
asar: true
}
}
},
compress: {
windows: {
options: {
archive: './dist/' + APP_NAME + '-' + APP_VERSION + '-'+tail+'.zip',
mode: 'zip'
},
files: [{
expand: true,
dot: true,
cwd: './dist/' + APP_NAME + '-'+tail,
src: '**/*'
}]
}
}
});

grunt.registerTask('default', ['babel', 'copy:dev', 'shell:electron']);

grunt.registerTask('run', ['babel', 'shell:electron']);

grunt.registerTask('deps', ['copy:node_modules']);

// if (process.platform === 'win32') {
grunt.registerTask('release', ['clean:release', 'electron:windows', 'babel:dist', 'copy:release', 'copy:depsWindows', 'compress:windows']);
// }

};
Binary file removed app.exe
Binary file not shown.
Binary file removed audio_sniffer-x64.dll
Binary file not shown.
File renamed without changes.
Binary file added bin/driver/darwin/Soundflower-2.0b2.dmg
Binary file not shown.
Binary file added bin/driver/darwin/audiodevice
Binary file not shown.
File renamed without changes.
Binary file added bin/driver/win32/RegInDll.dll
Binary file not shown.
Binary file added bin/driver/win32/RegSvrEx.exe
Binary file not shown.
Binary file added bin/driver/win32/audio_sniffer.dll
Binary file not shown.
Binary file removed ffmpeg.exe
Binary file not shown.
158 changes: 0 additions & 158 deletions index.js

This file was deleted.

Binary file removed node.exe
Binary file not shown.
31 changes: 29 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,45 @@
"name": "audio-cast",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"Error: no test specified\" && exit 1",
"postinstall": "grunt ffmpeg_libs"
},
"author": "",
"license": "ISC",
"electron-version": "0.35.1",
"main": "main.js",
"dependencies": {
"async": "^1.5.0",
"bluebird": "^3.0.6",
"castv2": "^0.1.4",
"castv2-client": "^1.1.0",
"express": "^4.13.3",
"fluent-ffmpeg": "^2.0.1",
"get-port": "^2.1.0",
"mdns-js": "^0.4.0",
"node-windows": "^0.1.10"
},
"devDependencies": {
"babel": "^6.1.18",
"babel-plugin-transform-merge-sibling-variables": "^6.1.18",
"babel-plugin-transform-minify-booleans": "^6.1.18",
"babel-plugin-transform-property-literals": "^6.1.18",
"babel-plugin-transform-simplify-comparison-operators": "^6.1.18",
"babel-preset-es2015": "^6.1.18",
"grunt": "^0.4.5",
"grunt-babel": "^6.0.0",
"grunt-contrib-clean": "^0.7.0",
"grunt-contrib-compress": "^0.14.0",
"grunt-contrib-copy": "^0.8.2",
"grunt-electron": "^2.0.1",
"grunt-ffmpeg-libs": "0.0.1",
"grunt-shell": "^1.1.2",
"grunt-shell-spawn": "^0.3.10",
"grunt-newer": "^1.1.1",
"load-grunt-tasks": "^3.3.0"
},
"optionalDependencies": {
"electron-prebuilt": "0.35.1"
}
}
Binary file added src/cast-connected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/cast.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit f1ba232

Please sign in to comment.