-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert extra 'show removed/added items' code
- Loading branch information
1 parent
6821bf5
commit c9f39ee
Showing
3 changed files
with
3 additions
and
26 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,26 +1,5 @@ | ||
import minifyDist from './minifyDist'; | ||
import prepareItems from './prepareItems'; | ||
// @ts-ignore asif | ||
import _items from '../src/data/items/item_data.json'; | ||
|
||
minifyDist(); | ||
const previousItems: string[] = []; | ||
for (const key of Object.keys(_items)) { | ||
previousItems.push(key); | ||
} | ||
|
||
const newItems: string[] = []; | ||
const deletedItems: string[] = []; | ||
prepareItems().then(newItemMap => { | ||
for (const key of Object.keys(newItemMap)) | ||
{ | ||
if (!previousItems.includes(key)) { | ||
newItems.push(key); | ||
} | ||
} | ||
for (const key of previousItems) { | ||
if (!newItemMap[key]) deletedItems.push(key); | ||
} | ||
console.log(`Deleted items: ${deletedItems}`); | ||
console.log(`New items: ${newItems}`); | ||
}); | ||
prepareItems(); |
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