-// We need the yui name to be available in all modules (as a global
variable).
-// This only happens if we remove the 'var' keyword or add it to the
"global"
-// variable.
-global.YUI = require('yui').YUI;
-
-YUI().use(['yui'], function(Y) {
+require('yui').YUI().use(['yui'], function(Y) {
var merge = require('../lib/merge-files.js'),
syspath = require('path'),
paths,
https:/ /codereview. appspot. com/6821090/ diff/15005/ bin/merge- files
File bin/merge-files (right):
https:/ /codereview. appspot. com/6821090/ diff/15005/ bin/merge- files#newcode20
bin/merge-files:20: global.YUI = require('yui').YUI;
Please ignore this entry. I moved it to the lib/merge-files.js file.
=== modified file 'bin/merge-files'
--- bin/merge-files 2012-11-09 12:54:56 +0000
+++ bin/merge-files 2012-11-09 13:00:19 +0000
@@ -14,12 +14,7 @@
'use strict';
-// We need the yui name to be available in all modules (as a global 'yui'). YUI().use( ['yui'] , function(Y) { '../lib/ merge-files. js'),
variable).
-// This only happens if we remove the 'var' keyword or add it to the
"global"
-// variable.
-global.YUI = require('yui').YUI;
-
-YUI().use(['yui'], function(Y) {
+require(
var merge = require(
syspath = require('path'),
paths,
https:/ /codereview. appspot. com/6821090/