Permalink
Browse files

Update escodegen, change test to install browser version, deprecate v…

…0.6 support
  • Loading branch information...
1 parent c4ac22e commit 9cf44d34bf158e69f741739bd6d16c6787a5f851 @gotwarlost committed Dec 26, 2013
Showing with 32 additions and 5 deletions.
  1. +1 −0 .gitignore
  2. +0 −1 .travis.yml
  3. +4 −3 package.json
  4. +1 −1 test/browser/support/server.js
  5. +26 −0 test/create-escodegen-browser.js
View
@@ -13,6 +13,7 @@ logs
results
node_modules/
+bower_components/
.idea/
html-report/
build/
View
@@ -1,7 +1,6 @@
language: node_js
node_js:
- - "0.6"
- "0.8"
- "0.10"
- "0.11"
View
@@ -26,7 +26,7 @@
"preferGlobal": true,
"scripts": {
"pretest": "jshint --config ./node_modules/yui-lint/jshint.json lib/*js lib/command/*js lib/report/*js lib/store/*js lib/util/*js test/*js test/instrumentation/*js test/cli/*js test/other/*js",
- "test": "test/run.js",
+ "test": "test/create-escodegen-browser.js && test/run.js",
"posttest": "node ./lib/cli.js check-coverage --statements 95 --branches 80",
"docs": "npm install yuidocjs && node node_modules/yuidocjs/lib/cli.js ."
},
@@ -39,7 +39,7 @@
},
"dependencies": {
"esprima": "1.0.x",
- "escodegen": "0.0.23",
+ "escodegen": "1.0.x",
"handlebars": "1.0.x",
"mkdirp": "0.3.x",
"nopt": "2.1.x",
@@ -55,7 +55,8 @@
"nodeunit": "*",
"jshint": "*",
"yui-lint": "*",
- "requirejs": "2.x"
+ "requirejs": "2.x",
+ "bower": "1.x"
}
}
@@ -11,7 +11,7 @@ var handlebars = require('handlebars'),
return fs.readFileSync(file, 'utf8');
},
esprimaSource = reader('..', '..', '..', 'node_modules', 'esprima', 'esprima.js'),
- escodegenSource = reader('..', '..', '..', 'node_modules', 'escodegen', 'escodegen.browser.js'),
+ escodegenSource = reader('..', '..', '..', 'bower_components', 'escodegen', 'escodegen.browser.js'),
vm = require('vm'),
server;
@@ -0,0 +1,26 @@
+#!/usr/bin/env node
+
+var exec = require('child_process').exec,
+ rimraf = require('rimraf'),
+ path = require('path'),
+ root = path.resolve(__dirname, '..'),
+ escodegenPackage = path.resolve(root, 'node_modules', 'escodegen', 'package.json'),
+ escodegen = require(escodegenPackage),
+ version = escodegen.version,
+ command = 'bower install escodegen#' + version;
+
+function main() {
+ var componentsDir = path.resolve(root, 'bower_components');
+ console.log('rm -rf ' + componentsDir + '/');
+ rimraf.sync(componentsDir);
+ console.log(command);
+ exec(command, { cwd: root, env: process.env }, function (err, stdout, stderr) {
+ console.log(stdout);
+ console.error(stderr);
+ if (err) { throw err; }
+ });
+}
+
+if (require.main === module) {
+ main();
+}

0 comments on commit 9cf44d3

Please sign in to comment.