protected function _minify( $package, $debug, $permissions )
	{
		$content = '';
		$ds = DIRECTORY_SEPARATOR;

		foreach( $this->_getFilenames( $package, $this->_basePath ) as $filename )
		{
			if( $ds !== '/' ) {
				$filename = str_replace( '/', $ds, $filename );
			}

			if( ( $content .= file_get_contents( $filename ) ) === false ) {
				throw new MW_Jsb2_Exception( sprintf( 'Unable to get content of file "%1$s"', $filename ) );
			}
		}

		if( $debug !== true ) {
			$content = JSMin::minify( $content );
		}

		$pkgFileName = $this->_basePath . $this->_deployDir . $package->file;

		if( $ds !== '/' ) {
			$pkgFileName = str_replace( '/', $ds, $pkgFileName );
		}

		if( file_put_contents( $pkgFileName, $content ) === false ) {
			throw new MW_Jsb2_Exception( sprintf( 'Unable to create package file "%1$s"', $pkgFileName ) );
		}

		if( chmod( $pkgFileName, $permissions ) === false ) {
			throw new MW_Jsb2_Exception( sprintf( 'Unable to change permissions of file "%1$s"', $pkgFileName ) );
		}
	}