Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from whefter/feature/autoload-named-exports
feat: allow autoloading of named exports
- Loading branch information
Showing
7 changed files
with
69 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const { createController } = require('../src/controller') | ||
|
||
class MixedDefaultExportClass {} | ||
MixedDefaultExportClass.isMixedDefaultExport = true | ||
module.exports.default = createController(MixedDefaultExportClass) | ||
|
||
class MixedNamedExportClass {} | ||
MixedNamedExportClass.isMixedNamedExport = true | ||
module.exports.MixedNamedExportClass = createController(MixedNamedExportClass) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
const { createController } = require('../src/controller') | ||
|
||
class MixedModuleExportsClass {} | ||
MixedModuleExportsClass.isMixedModuleExports = true | ||
module.exports = createController(MixedModuleExportsClass) | ||
|
||
class MixedModuleDefaultExportClass {} | ||
MixedModuleDefaultExportClass.isMixedModuleDefaultExport = true | ||
module.exports.default = createController(MixedModuleDefaultExportClass) | ||
|
||
class MixedModuleNamedExportClass {} | ||
MixedModuleNamedExportClass.isMixedModuleNamedExport = true | ||
module.exports.MixedModuleNamedExportClass = createController(MixedModuleNamedExportClass) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
const { createController } = require('../src/controller') | ||
|
||
class NamedExportClass {} | ||
NamedExportClass.isNamedExport = true | ||
module.exports.NamedExportClass = createController(NamedExportClass) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters