These are a list of instructions that should be followed when updating the source code of this project.
- Clone the latest version of each project
dom-serializer domhandler entities
domelementtype domutils htmlparser2
- Remove all files, except ts files (remove test files too)
rm -rf **/.github
rm -rf **/docs
rm -rf **/scripts
rm -rf **/__*
rm -rf **/*.{spec,test}.ts
rm */*
rm -rf */.*
- Move all src files down a directory
mv dom-serializer/src/* dom-serializer
rm -rf dom-serializer/src
mv domelementtype/src/* domelementtype
rm -rf domelementtype/src
mv domhandler/src/* domhandler
rm -rf domhandler/src
mv domutils/src/* domutils
rm -rf domutils/src
mv entities/src/* entities
rm -rf entities/src
mv htmlparser2/src/* htmlparser2
rm -rf htmlparser2/src
- Run codemod script
deno run -A --unstable codemod.ts
-
Manually change .json files to .ts files, and change imports from .json to .ts
-
Replace the event emitter import with a deno equivalent
// replace
import { EventEmitter } from '../events/index.ts';
// with
import EventEmitter from 'https://deno.land/x/[email protected]/mod.ts';
-
Remove all uses and definitions of WritableStream.
-
Finally, scan through all the .ts files in each project for any unforeseen errors.