-
-
Notifications
You must be signed in to change notification settings - Fork 598
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(replace): allow plugin to operate as an output plugin (#55)
* add execution hook to replace * add tests to replacement * break apart the executeReplacements function * move sourcemap tests to separate module, test out different configurations * fix(tests): correct sourcemaps test * clean up eslint-disable directives
- Loading branch information
1 parent
d6f988c
commit 0af323a
Showing
5 changed files
with
364 additions
and
83 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,185 @@ | ||
# Snapshot report for `test/sourcemaps.js` | ||
|
||
The actual snapshot is saved in `sourcemaps.js.snap`. | ||
|
||
Generated by [AVA](https://ava.li). | ||
|
||
## generates sourcemaps when sourcemap is used as an output argument | ||
|
||
> Snapshot 1 | ||
{ | ||
character: 12, | ||
column: 12, | ||
line: 1, | ||
} | ||
|
||
> Snapshot 2 | ||
{ | ||
column: 15, | ||
line: 1, | ||
name: null, | ||
source: 'other.js', | ||
} | ||
|
||
> Snapshot 3 | ||
{ | ||
character: 17, | ||
column: 0, | ||
line: 3, | ||
} | ||
|
||
> Snapshot 4 | ||
{ | ||
column: 0, | ||
line: 2, | ||
name: null, | ||
source: 'main.js', | ||
} | ||
|
||
## generates sourcemaps if enabled in plugin | ||
|
||
> Snapshot 1 | ||
{ | ||
character: 12, | ||
column: 12, | ||
line: 1, | ||
} | ||
|
||
> Snapshot 2 | ||
{ | ||
column: 15, | ||
line: 1, | ||
name: null, | ||
source: 'other.js', | ||
} | ||
|
||
> Snapshot 3 | ||
{ | ||
character: 17, | ||
column: 0, | ||
line: 3, | ||
} | ||
|
||
> Snapshot 4 | ||
{ | ||
column: 0, | ||
line: 2, | ||
name: null, | ||
source: 'main.js', | ||
} | ||
|
||
## generates sourcemaps if enabled in plugin (camelcase) | ||
|
||
> Snapshot 1 | ||
{ | ||
character: 12, | ||
column: 12, | ||
line: 1, | ||
} | ||
|
||
> Snapshot 2 | ||
{ | ||
column: 15, | ||
line: 1, | ||
name: null, | ||
source: 'other.js', | ||
} | ||
|
||
> Snapshot 3 | ||
{ | ||
character: 17, | ||
column: 0, | ||
line: 3, | ||
} | ||
|
||
> Snapshot 4 | ||
{ | ||
column: 0, | ||
line: 2, | ||
name: null, | ||
source: 'main.js', | ||
} | ||
|
||
## generates sourcemaps by dfault | ||
|
||
> Snapshot 1 | ||
{ | ||
character: 12, | ||
column: 12, | ||
line: 1, | ||
} | ||
|
||
> Snapshot 2 | ||
{ | ||
column: 15, | ||
line: 1, | ||
name: null, | ||
source: 'other.js', | ||
} | ||
|
||
> Snapshot 3 | ||
{ | ||
character: 17, | ||
column: 0, | ||
line: 3, | ||
} | ||
|
||
> Snapshot 4 | ||
{ | ||
column: 0, | ||
line: 2, | ||
name: null, | ||
source: 'main.js', | ||
} | ||
|
||
## generates sourcemaps by default | ||
|
||
> Snapshot 1 | ||
{ | ||
character: 12, | ||
column: 12, | ||
line: 1, | ||
} | ||
|
||
> Snapshot 2 | ||
{ | ||
column: 15, | ||
line: 1, | ||
name: null, | ||
source: 'other.js', | ||
} | ||
|
||
> Snapshot 3 | ||
{ | ||
character: 17, | ||
column: 0, | ||
line: 3, | ||
} | ||
|
||
> Snapshot 4 | ||
{ | ||
column: 0, | ||
line: 2, | ||
name: null, | ||
source: 'main.js', | ||
} |
Binary file not shown.
Oops, something went wrong.