Skip to content

Commit

Permalink
remove logging with grunt
Browse files Browse the repository at this point in the history
  • Loading branch information
therewasaguy committed Feb 2, 2015
1 parent 06412ec commit 83af4c0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
15 changes: 12 additions & 3 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ module.exports = function(grunt) {
if (path.indexOf('node_modules/tone/') > -1) {
return '/** Tone.js module by Yotam Mann, MIT License 2014 http://opensource.org/licenses/MIT **/\n' +
require('amdclean').clean({
'code': contents,
'code': contents.replace(/console.log(.*);/g, ''),
'escodegen': {
'comment': false,
'skipDirOptimize':true,
Expand Down Expand Up @@ -122,12 +122,21 @@ module.exports = function(grunt) {
findNestedDependencies: true,
include: ['src/app'],
onBuildWrite: function( name, path, contents ) {
return require('amdclean').clean({
'code':contents,
if (path.indexOf('node_modules/tone/') > -1) {
return require('amdclean').clean({
'code':contents.replace(/console.log(.*);/g, ''),
'escodegen': {
'comment': false
}
});
} else {
return require('amdclean').clean({
'code':contents,
'escodegen': {
'comment': false
}
});
}
},
optimize: 'uglify2',
out: 'lib/p5.sound.min.js',
Expand Down
3 changes: 1 addition & 2 deletions lib/p5.sound.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! p5.sound.js v0.1.7 2015-01-30 */
/*! p5.sound.js v0.1.7 2015-02-02 */
/**
* p5.sound extends p5 with <a href="http://caniuse.com/audio-api"
* target="_blank">Web Audio</a> functionality including audio input,
Expand Down Expand Up @@ -2253,7 +2253,6 @@ Tone_core_Tone = function () {
_silentNode.gain.value = 0;
_silentNode.connect(audioContext.destination);
});
console.log('%c * Tone.js r3 * ', 'background: #000; color: #fff');
return Tone;
}();
/** Tone.js module by Yotam Mann, MIT License 2014 http://opensource.org/licenses/MIT **/
Expand Down
Loading

0 comments on commit 83af4c0

Please sign in to comment.