-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
63902d3
commit 06922e7
Showing
3 changed files
with
58 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
57150 |
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,56 @@ | ||
source "./utils.sh" | ||
cd ../testrepo | ||
|
||
bold "Test: It should support custom suffixes" | ||
|
||
# Clean Repo | ||
sleep 1 | ||
if rewatch clean &> /dev/null; | ||
then | ||
success "Repo Cleaned" | ||
else | ||
error "Error Cleaning Repo" | ||
exit 1 | ||
fi | ||
|
||
# Replace suffix | ||
replace "s/.mjs/.bs.js/g" bsconfig.json | ||
|
||
if rewatch build &> /dev/null; | ||
then | ||
success "Repo Built" | ||
else | ||
error "Error building repo" | ||
exit 1 | ||
fi | ||
|
||
# Count files with new extension | ||
file_count=$(find . -name *.bs.js | wc -l) | ||
|
||
if [ "$file_count" -eq 11 ]; | ||
then | ||
success "Found files with correct suffix" | ||
else | ||
error "Suffix not correctly used" | ||
exit 1 | ||
fi | ||
|
||
if rewatch clean &> /dev/null; | ||
then | ||
success "Repo Cleaned" | ||
else | ||
error "Error Cleaning Repo" | ||
exit 1 | ||
fi | ||
|
||
# Restore Suffix | ||
replace "s/.bs.js/.mjs/g" bsconfig.json | ||
|
||
# Restore original build | ||
if rewatch build &> /dev/null; | ||
then | ||
success "Repo Built" | ||
else | ||
error "Error building repo" | ||
exit 1 | ||
fi |
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 |
---|---|---|
|
@@ -22,4 +22,4 @@ else | |
exit 1 | ||
fi | ||
|
||
./compile.sh && ./watch.sh && ./lock.sh | ||
./compile.sh && ./watch.sh && ./lock.sh && ./suffix.sh |