Skip to content

Commit

Permalink
feat(generic): allow third party modules to be named whatever they want
Browse files Browse the repository at this point in the history
  • Loading branch information
MarshallOfSound authored and malept committed Feb 28, 2017
1 parent e3962d3 commit fddb40e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/api/make.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ export default async (providedOptions = {}) => {
`../makers/${process.platform}/${target}.js`,
`../makers/generic/${target}.js`,
`electron-forge-maker-${target}`,
target,
path.resolve(dir, target),
]);
if (!maker) {
throw `Could not find a build target with the name: ${target} for the platform: ${declaredPlatform}`;
Expand Down
5 changes: 4 additions & 1 deletion src/api/publish.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'colors';
import path from 'path';

import asyncOra from '../util/ora-handler';
import deprecate from '../util/deprecate';
Expand Down Expand Up @@ -67,10 +68,12 @@ export default async (providedOptions = {}) => {

for (const publishTarget of publishTargets) {
let publisher;
await asyncOra(`Resolving publish target: ${`${publishTarget}`.cyan}`, async () => {
await asyncOra(`Resolving publish target: ${`${publishTarget}`.cyan}`, async () => { // eslint-disable-line no-loop-func
publisher = requireSearch(__dirname, [
`../publishers/${publishTarget}.js`,
`electron-forge-publisher-${publishTarget}`,
publishTarget,
path.resolve(dir, publishTarget),
]);
if (!publisher) {
throw `Could not find a publish target with the name: ${publishTarget}`;
Expand Down

0 comments on commit fddb40e

Please sign in to comment.