From 146c8e096e1797f656ad81e980e88a363d2eaba4 Mon Sep 17 00:00:00 2001 From: Austin Pivarnik Date: Thu, 7 May 2015 15:28:26 -0400 Subject: [PATCH] Replace reserved word 'package' with 'pkg' --- lib/extensions.js | 14 +++++++------- lib/index.js | 4 ++-- scripts/install.js | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/extensions.js b/lib/extensions.js index 253b3288d..a2369363d 100644 --- a/lib/extensions.js +++ b/lib/extensions.js @@ -4,7 +4,7 @@ var flags = {}, fs = require('fs'), - package = require('../package.json'), + pkg = require('../package.json'), path = require('path'); /** @@ -63,8 +63,8 @@ function getBinaryName() { binaryName = flags['--sass-binary-name']; } else if (process.env.SASS_BINARY_NAME) { binaryName = process.env.SASS_BINARY_NAME; - } else if (package.nodeSassConfig && package.nodeSassConfig.binaryName) { - binaryName = package.nodeSassConfig.binaryName; + } else if (pkg.nodeSassConfig && pkg.nodeSassConfig.binaryName) { + binaryName = pkg.nodeSassConfig.binaryName; } else { binaryName = [process.platform, '-', process.arch, '-', @@ -104,8 +104,8 @@ function getBinaryName() { function getBinaryUrl() { var site = flags['--sass-binary-site'] || process.env.SASS_BINARY_SITE || - package.nodeSassConfig.binarySite; - return [site, 'v' + package.version, sass.binaryName].join('/'); + pkg.nodeSassConfig.binarySite; + return [site, 'v' + pkg.version, sass.binaryName].join('/'); } @@ -138,8 +138,8 @@ sass.getBinaryPath = function(throwIfNotExists) { binaryPath = flags['--sass-binary-path']; } else if (process.env.SASS_BINARY_PATH) { binaryPath = process.env.SASS_BINARY_PATH; - } else if (package.nodeSassConfig && package.nodeSassConfig.binaryPath) { - binaryPath = package.nodeSassConfig.binaryPath; + } else if (pkg.nodeSassConfig && pkg.nodeSassConfig.binaryPath) { + binaryPath = pkg.nodeSassConfig.binaryPath; } else { binaryPath = path.join(__dirname, '..', 'vendor', sass.binaryName.replace(/_/, '/')); } diff --git a/lib/index.js b/lib/index.js index 98d875b9d..4057930c1 100644 --- a/lib/index.js +++ b/lib/index.js @@ -5,7 +5,7 @@ var eol = require('os').EOL, path = require('path'), util = require('util'), - package = require('../package.json'); + pkg = require('../package.json'); require('./extensions'); @@ -23,7 +23,7 @@ var binding = require(process.sass.getBinaryPath(true)); function getVersionInfo(binding) { return [ - ['node-sass', package.version, '(Wrapper)', '[JavaScript]'].join('\t'), + ['node-sass', pkg.version, '(Wrapper)', '[JavaScript]'].join('\t'), ['libsass ', binding.libsassVersion(), '(Sass Compiler)', '[C/C++]'].join('\t'), ].join(eol); } diff --git a/scripts/install.js b/scripts/install.js index 1e210e085..0f23dc656 100644 --- a/scripts/install.js +++ b/scripts/install.js @@ -7,7 +7,7 @@ var fs = require('fs'), npmconf = require('npmconf'), path = require('path'), request = require('request'), - package = require('../package.json'); + pkg = require('../package.json'); require('../lib/extensions'); @@ -33,7 +33,7 @@ function download(url, dest, cb) { options.headers = { 'User-Agent': [ 'node/', process.version, ' ', - 'node-sass-installer/', package.version + 'node-sass-installer/', pkg.version ].join('') }; try {