Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/bundleManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ var BundleManager = function() {

_.each(files, function(file, idx) {

// Make sure we ignore non-js files, dotfiles, packae.json and config.json
if (file.indexOf('.js') !== -1 && file.indexOf('package.json') === -1 && file.indexOf('config.json') === -1 && (file[0] !== '.' || (targetFile && targetFile.indexOf(file) != -1 ))) {
// Make sure we ignore non-js files, package.json and config.json
if (file.indexOf('.js') !== -1 && file.indexOf('package.json') === -1 && file.indexOf('config.json') === -1) {
// if any part fo the bundle is not valid js an error will be thrown and we ignore the rest of the file
try {
var tempBundle = require(bundlesFolder + "/" + file);
Expand Down Expand Up @@ -109,7 +109,7 @@ var BundleManager = function() {
winston.event('Bundle file changed: ' + file);

// To bust node's module caching we rename the file before calling updateBundle
var tempFile = '.'+uuid.v4();
var tempFile = file+'.'+uuid.v4();
fs.renameSync(file, tempFile);
self.refreshBundles(tempFile, function() {
// Now we can change the bundle name back to its original name
Expand Down