-
Notifications
You must be signed in to change notification settings - Fork 2
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 #18 from danmooozi/refactor_transform
transform 동작 설명 추가 및 테스트 유틸함수 수정
- Loading branch information
Showing
6 changed files
with
126 additions
and
56 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
export const FORMAT = { | ||
ESM: 'esm', | ||
CJS: 'cjs', | ||
}; | ||
import transformStrictMode from '../transform-strict-mode.js'; | ||
import transformEsmToCjs from '../transform-esm-to-cjs.js'; | ||
|
||
export const DEFAULT_OPTIONS = { | ||
requireCode: true, | ||
requireAst: false, | ||
format: FORMAT.CJS, | ||
}; | ||
|
||
export const DEFAULT_IMPORT_KEYWORD = 'default'; | ||
export const DEFAULT_IMPORT_KEYWORD = '_default'; | ||
|
||
// aliases | ||
Object.assign(FORMAT, { | ||
esm: FORMAT.ESM, | ||
es: FORMAT.ESM, | ||
cjs: FORMAT.CJS, | ||
cj: FORMAT.CJS, | ||
}); | ||
export const PLUGIN_MAP = { | ||
strictMode: { | ||
plugin: transformStrictMode, | ||
conditions: [], | ||
}, | ||
esmToCjs: { | ||
plugin: transformEsmToCjs, | ||
conditions: [], | ||
}, | ||
}; |
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
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
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