Comparing version 0.9.54 to 0.9.55
@@ -5,2 +5,5 @@ { | ||
"path": "file:///d:/libjs/" | ||
}, | ||
"bootstrap": { | ||
"path": "file:///d:/libjs/vendor/bootstrap/" | ||
} | ||
@@ -11,3 +14,4 @@ }, | ||
"atma_ruqq": "{atma}/ruqq/lib/{0}.js", | ||
"atma_compo": "{atma}/compos/{0}/lib/{1}.js" | ||
"atma_compo": "{atma}/compos/{0}/lib/{1}.js", | ||
"bootstrap": "{bootstrap}/{0}.less" | ||
}, | ||
@@ -14,0 +18,0 @@ |
@@ -7,5 +7,5 @@ { | ||
"name": "Alexander Kit", | ||
"email": "source.kit@gmail.com" | ||
"email": "alex.kit@atmajs.com" | ||
}, | ||
"version": "0.9.54", | ||
"version": "0.9.55", | ||
"bin": { | ||
@@ -22,4 +22,5 @@ "atma": "atma" | ||
"jshint": "~0.9.1", | ||
"coffee-script": "~1.4.0", | ||
"less": "~1.3.3", | ||
"coffee-script": ">0.0.0", | ||
"less": ">0.0.0", | ||
"yamljs": ">0.0.0", | ||
"openurl": "~1.1.0", | ||
@@ -26,0 +27,0 @@ "socket.io-client": "~0.9.11", |
@@ -16,5 +16,9 @@ include.exports = { | ||
process: function(config, done) { | ||
var script = config.script; | ||
if (script && typeof script.process === 'function'){ | ||
script.process(config, done); | ||
return; | ||
} | ||
if (config.args && !script) { | ||
@@ -21,0 +25,0 @@ script = config.args[0]; |
@@ -69,5 +69,8 @@ include | ||
jsAst: function(solution, stack, output) { | ||
var cfg = solution.config, | ||
fileName_IncludeJS = cfg && cfg.includejsFile || 'include.js'; | ||
var ast = UglifyJS.parse(''), | ||
includeIndex = ruqq.arr.indexOf(stack, function(x) { | ||
return x.url.indexOf('include.js') !== -1; | ||
return x.url.indexOf(fileName_IncludeJS) !== -1; | ||
}); | ||
@@ -74,0 +77,0 @@ |
@@ -33,3 +33,3 @@ (function() { | ||
if (x[j][x[j].length - 1] === c) { | ||
debugger; | ||
var str = x.splice(index, j - index + 1).join(' '); | ||
@@ -57,3 +57,3 @@ | ||
if (!command) { | ||
if (command == null) { | ||
this.done(); | ||
@@ -85,3 +85,3 @@ return; | ||
logger | ||
.error('Could not run command'); | ||
.error('Could not run the command', command); | ||
@@ -88,0 +88,0 @@ this.process(); |
@@ -28,7 +28,7 @@ var resource = include; | ||
resp.Cfg(app, function(obj) { | ||
cfgObj_extend(app.config, obj); | ||
self.resolve(); | ||
}); | ||
}); | ||
}); | ||
@@ -35,0 +35,0 @@ return self; |
@@ -16,7 +16,7 @@ include.js({ | ||
read: function() { | ||
if (this.images && this.content){ | ||
if (this.resources && this.content){ | ||
return this.content; | ||
} | ||
this.content = io.File.prototype.read.call(this); | ||
this.images = CssParser.extractImages(global.solution.uri, this.uri, this.content); | ||
this.resources = CssParser.extractResources(global.solution.uri, this.uri, this.content); | ||
@@ -49,9 +49,12 @@ return this.content; | ||
var solutionUri = global.solution.uri, | ||
isSubDir = path_isSubDir(solutionUri.toString(), cssFile.uri.toString()), | ||
images = cssFile.images, | ||
dir = net.Uri.combine(targetUri.toLocalDir(), 'images/'); | ||
cssFilePath = cssFile.uri.toString(), | ||
isSubDir = cssFilePath.indexOf('.reference/') === -1 | ||
? path_isSubDir(solutionUri.toString(), cssFilePath) | ||
: true, | ||
resources = cssFile.resources, | ||
dir = net.Uri.combine(targetUri.toLocalDir(), 'resources/'); | ||
for (var i = 0, x, length = images.length; x = images[i], i < length; i++) { | ||
resources.forEach(function(x){ | ||
if (isSubDir == false) { | ||
@@ -64,2 +67,3 @@ var uri = new net.Uri(net.Uri.combine(dir, x.uri.file)); | ||
} else { | ||
x.replaceWith = getRewritenPath(x.uri, x.href, targetUri.toLocalDir()); | ||
@@ -71,4 +75,4 @@ } | ||
} | ||
} | ||
}); | ||
} | ||
}); |
include.exports = { | ||
extractImages: function(baseuri, uri, content) { | ||
extractResources: function(baseuri, uri, content) { | ||
@@ -12,6 +12,7 @@ var regexp = new RegExp(/url[\s]*\(('|")?([^)'"]+)('|")?\)/gi), | ||
if (!href) { | ||
console.error('NOT MATCHED', match); | ||
} | ||
if (!href) | ||
logger.error('NOT MATCHED', match); | ||
if (isAbsolute(href) === false) { | ||
@@ -51,3 +52,9 @@ | ||
function isAbsolute(href) { | ||
if (href == null) | ||
return true; | ||
if (/^\s*data:/.test(href)) | ||
return true; | ||
return /^[\w]{1,8}:\/\//.exec(href) != null; | ||
} |
include | ||
.js( | ||
'static-reference.js::RefPath', | ||
'videostreamer.js', | ||
'../proxy.js' | ||
@@ -8,3 +9,4 @@ ) | ||
var File = io.File; | ||
var File = io.File, | ||
Videostreamer = resp.videostreamer; | ||
@@ -40,4 +42,12 @@ var path = app.current.file || net.Uri.combine(process.cwd(), 'temp.del'), | ||
var mimeType = MimeTypes[file.uri.extension] || 'text/plain', | ||
content = file.read('binary'); | ||
var mimeType = MimeTypes[file.uri.extension] || 'text/plain'; | ||
if (mimeType.indexOf('video/') === 0) { | ||
Videostreamer(file.uri.toLocalFile(), request, response); | ||
return; | ||
} | ||
var content = file.read('binary'); | ||
@@ -62,5 +72,5 @@ | ||
response.writeHeader(404, { | ||
"Content-Type": "text/plain" | ||
'Content-Type': 'text/plain' | ||
}); | ||
response.end("404 Not Found - " + file.uri.toLocalFile()); | ||
response.end('404 Not Found - ' + file.uri.toLocalFile()); | ||
@@ -87,2 +97,12 @@ }, | ||
set('image/png', 'png'); | ||
set('image/svg+xml', 'svg'); | ||
set('video/mp4', 'mp4', 'f4v', 'f4p'); | ||
set('video/ogg', 'ogv'); | ||
set('video/webm', 'webm'); | ||
set('video/x-flv', 'flv'); | ||
set('video/mov', '/quicktime') | ||
set('video/x-flv', 'flv') | ||
set('application/x-shockwave-flash', 'swf'); | ||
@@ -89,0 +109,0 @@ |
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
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
1151387
133
26758
15
13
+ Addedyamljs@>0.0.0
+ Addedargparse@1.0.10(transitive)
+ Addedbrace-expansion@1.1.11(transitive)
+ Addedcoffee-script@1.12.7(transitive)
+ Addedconcat-map@0.0.1(transitive)
+ Addedcopy-anything@2.0.6(transitive)
+ Addederrno@0.1.8(transitive)
+ Addedfs.realpath@1.0.0(transitive)
+ Addedglob@7.2.3(transitive)
+ Addedgraceful-fs@4.2.11(transitive)
+ Addedimage-size@0.5.5(transitive)
+ Addedinflight@1.0.6(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedis-what@3.14.1(transitive)
+ Addedless@4.2.1(transitive)
+ Addedmake-dir@2.1.0(transitive)
+ Addedmime@1.6.0(transitive)
+ Addedminimatch@3.1.2(transitive)
+ Addedneedle@3.3.1(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedparse-node-version@1.0.1(transitive)
+ Addedpath-is-absolute@1.0.1(transitive)
+ Addedpify@4.0.1(transitive)
+ Addedprr@1.0.1(transitive)
+ Addedsax@1.4.1(transitive)
+ Addedsemver@5.7.2(transitive)
+ Addedsource-map@0.6.1(transitive)
+ Addedsprintf-js@1.0.3(transitive)
+ Addedtslib@2.8.1(transitive)
+ Addedwrappy@1.0.2(transitive)
+ Addedyamljs@0.3.0(transitive)
- Removedcoffee-script@1.4.0(transitive)
- Removedless@1.3.3(transitive)
- Removedycssmin@1.0.1(transitive)
Updatedcoffee-script@>0.0.0
Updatedless@>0.0.0