srcts2dist
v1.0.12
Published
Replace imports and move folders
Readme
Why?
idk.
srcts2dist
Renames folders and changes imports in files from src to dist. It also deletes it .d.ts if you don't need them.
Use
npx -y srcts2dist [PARAMS] ./workdir [excludes]
Params
- --replaceDir - Renames folder "src" to "dist"
- --deleteDts - Delete .d.ts files
- --ignoreModules - Ignore "node_modules" folder
- --replaceImports - Replace all words "src" to "dist" in file (regex:
/([\'\"\\\/\s])src([\'\"\\\/\s])/gm)
Excludes
You can provide the path to the file that does not need to be touched. For example, some kind of package in monorepo.
npx -y srcts2dist --replaceDir ./workspaces/ ./shared ./frontend
The ./workspaces/shared/* and ./workspaces/frontend/* folders, as well as the files in them, will not be affected.
