Comparing version 1.7.3 to 1.8.2
14
grunt.js
module.exports = function(grunt) { | ||
var exec = require('child_process').exec, | ||
@@ -7,5 +7,5 @@ http = require('http'), | ||
host = 'ajax.googleapis.com', | ||
jqPath = '/ajax/libs/jquery/1.7.2/jquery.js'; | ||
jqPath = '/ajax/libs/jquery/1.8.2/jquery.js'; | ||
grunt.registerTask('build', 'builds query module for us in nodje', function() { | ||
grunt.registerTask('build', 'builds jquery module for us in nodjs', function() { | ||
var tmpDir = './tmp', distDir = './lib', | ||
@@ -26,9 +26,9 @@ done = this.async(), wrapper; | ||
host: host, | ||
port: 80, | ||
port: 80, | ||
path: jqPath, | ||
method: 'GET' | ||
}, function(res) { | ||
res.setEncoding('utf8'); | ||
res.setEncoding('utf8'); | ||
res.on('data', function(chunk) { | ||
data += chunk; | ||
data += chunk; | ||
}); | ||
@@ -49,3 +49,3 @@ res.on('end', function() { | ||
try { | ||
jq = fs.readFileSync(tmpDir+'/jquery.js', 'utf8'); | ||
jq = fs.readFileSync(tmpDir+'/jquery.js', 'utf8'); | ||
buildjQuery(jq); | ||
@@ -52,0 +52,0 @@ } catch (e) { |
{ | ||
"name": "jquery", | ||
"description": "jQuery: The Write Less, Do More, JavaScript Library (packaged for Node.JS)", | ||
"version": "1.7.3", | ||
"version": "1.8.2", | ||
"url": "http://jquery.com", | ||
@@ -6,0 +6,0 @@ "homepage": "https://github.com/coolaj86/node-jquery", |
@@ -8,16 +8,18 @@ node-jQuery | ||
--- | ||
``` | ||
npm install jQuery | ||
var $ = require('jQuery'); | ||
``` | ||
Examples | ||
--- | ||
```javascript | ||
$("<h1>test passes</h1>").appendTo("body"); | ||
console.log($("body").html()); | ||
``` | ||
In Node.JS you may also create separate window instances | ||
```javascript | ||
var jsdom = require('jsdom').jsdom | ||
@@ -38,8 +40,11 @@ , myWindow = jsdom().createWindow() | ||
console.log(jQuery("body").html()); | ||
``` | ||
Output: | ||
```html | ||
<h1>test passes</h1> | ||
<h2>other test passes</h2> | ||
<h3>third test passes</h3> | ||
``` | ||
@@ -49,2 +54,3 @@ JSONP Example | ||
```javascript | ||
var $ = require('jQuery'); | ||
@@ -55,3 +61,3 @@ | ||
}); | ||
``` | ||
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
Found 1 instance in 1 package
584768
16944
60
0