Comparing version 0.1.2 to 0.1.3
@@ -1,2 +0,2 @@ | ||
var fs, path, util, spawn, watchFilesOnce, compilers, compilerFromPath, chemfile_path, getChemfilePath, forceRequireChemfile, chemPath, userPath, client_out, img_path, spritesheet_out, animations_json_out, all_out_files, sign, exec, compileClientSource, serveStaticFiles, watchSpritesheet, forceRequire, walk, cmpStr, getAllImgFiles, filesFromAnimFrames, createSpritesheet, tasks, run, __out = typeof exports != 'undefined' && exports || this; | ||
var fs, path, util, spawn, jspackage, watchFilesOnce, compilerFromPath, chemfile_path, getChemfilePath, forceRequireChemfile, chemPath, userPath, client_out, img_path, spritesheet_out, animations_json_out, all_out_files, sign, exec, compileClientSource, serveStaticFiles, watchSpritesheet, forceRequire, walk, cmpStr, getAllImgFiles, filesFromAnimFrames, createSpritesheet, tasks, run, __out = typeof exports != 'undefined' && exports || this; | ||
fs = require('fs'); | ||
@@ -6,17 +6,4 @@ path = require('path'); | ||
spawn = require('child_process').spawn; | ||
jspackage = require('jspackage'); | ||
watchFilesOnce = require('./watch').watchFilesOnce; | ||
compilers = { | ||
'.coffee': { | ||
require: 'coffee-script' | ||
}, | ||
'.co': { | ||
require: 'coco' | ||
}, | ||
'.ls': { | ||
require: 'LiveScript' | ||
}, | ||
'.js': { | ||
require: null | ||
} | ||
}; | ||
compilerFromPath = function(filepath){ | ||
@@ -28,3 +15,3 @@ var ext; | ||
ext = path.extname(filepath); | ||
return compilers[ext]; | ||
return jspackage.extensions[ext]; | ||
}; | ||
@@ -97,4 +84,3 @@ chemfile_path = null; | ||
compileClientSource = function(options){ | ||
var compile, libs, main, l, __ref; | ||
compile = require('jspackage').compile; | ||
var libs, main, l, __ref; | ||
__ref = forceRequireChemfile(), libs = __ref.libs, main = __ref.main; | ||
@@ -110,3 +96,3 @@ options.mainfile = userPath(main); | ||
}()).concat([chemPath("./src/shared/"), chemPath("./src/client/")]); | ||
compile(options, function(err, compiled_code){ | ||
jspackage.compile(options, function(err, compiled_code){ | ||
var timestamp; | ||
@@ -303,3 +289,3 @@ if (err) { | ||
project_name = args[0]; | ||
template = args[1] || "meteor"; | ||
template = args[1] || "readme"; | ||
if (project_name == null) { | ||
@@ -306,0 +292,0 @@ tasks.help(); |
@@ -18,11 +18,15 @@ var fs, watchFileFallback, watchFile, watchFilesOnce, __out = typeof exports != 'undefined' && exports || this; | ||
__out.watchFilesOnce = watchFilesOnce = function(files, cb){ | ||
var watchers, doCallback, file, watcher, __i, __len; | ||
var watchers, close, doCallback, file, watcher, __i, __len; | ||
watchers = []; | ||
close = function(){ | ||
var watcher, __i, __ref, __len; | ||
for (__i = 0, __len = (__ref = watchers).length; __i < __len; ++__i) { | ||
watcher = __ref[__i]; | ||
watcher.close(); | ||
} | ||
watchers = []; | ||
}; | ||
doCallback = function(event){ | ||
var watcher, __i, __ref, __len; | ||
if (event === 'change') { | ||
for (__i = 0, __len = (__ref = watchers).length; __i < __len; ++__i) { | ||
watcher = __ref[__i]; | ||
watcher.close(); | ||
} | ||
close(); | ||
cb(); | ||
@@ -40,2 +44,5 @@ } | ||
} | ||
return { | ||
close: close | ||
}; | ||
}; |
@@ -5,3 +5,3 @@ { | ||
"author": "Andrew Kelley <superjoe30@gmail.com>", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"licenses": [{ | ||
@@ -22,3 +22,3 @@ "type": "MIT", | ||
"node-static": "~0.6.0", | ||
"jspackage": "~0.4.5" | ||
"jspackage": "~0.4.7" | ||
}, | ||
@@ -25,0 +25,0 @@ "devDependencies": { |
@@ -9,2 +9,3 @@ //depend "chem" | ||
var batch = new Chem.Batch(); | ||
var boom = new Chem.Sound('sfx/boom.ogg'); | ||
var ship = new Chem.Sprite('ship', { | ||
@@ -40,2 +41,3 @@ batch: batch, | ||
if (engine.buttonJustPressed(Chem.Button.Key_Space)) { | ||
boom.play(); | ||
ship.setAnimationName('boom'); | ||
@@ -42,0 +44,0 @@ ship.setFrameIndex(0); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
123733
59
731
678
1
Updatedjspackage@~0.4.7