Preload sound files for instant playback (#374)

* rm dist at start of build

* renderer style

* preload sound files for instant playback

The first time a sound file is played, the Audio object is cached.

5s after startup, all sound files are automatically preloaded.
This commit is contained in:
Feross Aboukhadijeh
2016-04-10 16:46:46 -07:00
parent 69460db294
commit 45f6cc5247
4 changed files with 108 additions and 67 deletions

View File

@@ -15,6 +15,7 @@ var rimraf = require('rimraf')
var BUILD_NAME = config.APP_NAME + '-v' + config.APP_VERSION
function build () {
rimraf.sync(path.join(config.ROOT_PATH, 'dist'))
var platform = process.argv[2]
var packageType = process.argv.length > 3 ? process.argv[3] : 'all'
if (platform === 'darwin') {