This repository has been archived by the owner on Aug 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat(typescript): `TrextNodePath` * refactor(plugins): consolidate `Trextel` transformation logic * fix(plugins): ignore directory indexes
- Loading branch information
1 parent
a14fd44
commit 3313025
Showing
13 changed files
with
202 additions
and
62 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
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,19 @@ | ||
import type { TrextOptions } from '@flex-development/trext' | ||
import { trext } from '@flex-development/trext' | ||
import { inspect } from 'util' | ||
|
||
/** | ||
* @file Examples - Ignoring Directory Indexes | ||
* @module docs/examples/src | ||
*/ | ||
|
||
const TREXT_OPTIONS: TrextOptions<'js', 'cjs'> = { | ||
from: 'js', | ||
pattern: /.js$/, | ||
src: 'lib', | ||
to: 'cjs' | ||
} | ||
|
||
trext('cjs/', TREXT_OPTIONS) | ||
.then(results => console.info(inspect(results, false, null))) | ||
.catch(error => console.error(inspect(error, false, 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import type { NodePath } from '@babel/core' | ||
import type { CallExpression, ImportDeclaration } from '@babel/types' | ||
|
||
/** | ||
* @file Type Definitions - TrextNodePath | ||
* @module trext/types/TrextNodePath | ||
*/ | ||
|
||
/** | ||
* {@link NodePath} objects used by `Trextel`, our [custom Babel plugin][1]. | ||
* | ||
* - See {@link CallExpression} | ||
* - See {@link ImportDeclaration} | ||
* | ||
* [1]: https://github.com/jamiebuilds/babel-handbook/blob/master/translations/en/plugin-handbook.md | ||
*/ | ||
type TrextNodePath = NodePath<CallExpression | ImportDeclaration> | ||
|
||
export default TrextNodePath |
Oops, something went wrong.