Skip to content
This repository has been archived by the owner on Jun 15, 2021. It is now read-only.

fix issue - ender does not support multiple sources in packageJSON.main #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
4 changes: 2 additions & 2 deletions lib/source-package.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ var path = require('path')
this.packageJSON = packageJSON

if (!this.packageJSON.main) this.packageJSON.main = './index.js'
if (!this.packageJSON.main.match(/\.js$/)) this.packageJSON.main += '.js'
if (typeof this.packageJSON.main == "string" && !this.packageJSON.main.match(/\.js$/)) this.packageJSON.main += '.js'

// custom hasher function for async.memoize so we have a single key, default will use
// first arg (callback) as hash key which won't work
Expand Down Expand Up @@ -196,4 +196,4 @@ var path = require('path')

module.exports.create = function (packageName, parents, isClient, packageJSON, options) {
return Object.create(SourcePackage).init(packageName, parents, isClient, packageJSON, options)
}
}