Coder Social home page Coder Social logo

ts-devscript's Introduction

DevScript

Simple development script to make working with TypeScript projects easy.
DevScript

Why

I wrote this script to simplify my TypeScript workflow as I like to have all my files organised and hate having multiple terminals open at the same time.
This script copies and compiles everything in src to out and then runs the file.
It also automatically restarts the file on file additions, changes and deletions.

Installation

# global
npm i --location=global ts-devscript

# npm
npm i -D ts-devscript

# yarn
yarn add -D ts-devscript

Usage

# if global
devScript

# if local
npx devScript

Configuration

Possile Arugments

Note: These arguments can also be used in your package.json file, simply add the devScript property to the root of the package.json and use them as key-value pairs.

Options Type Description Default
--help Shows the help command of devScript.
--src string Directory containing the source code. src
--out string Directory that will contain the output. dist
--deleteObsolete boolean Whether or not to delete files from out that are not in the src. true
--tsconfig string Path to a valid tsconfig.json file. tsconfig.json
--entry string Entry file to be executed after compilation. index.js
--depCheck boolean Whether or not to check the dependencies. true
--excludeDeps string Dependencies to exclude from automatically uninstalling. (String list seperated by commas)
--autoInstallDep boolean Automatically installs missing dependencies. (Needs depCheck enabled) true
--autoRemoveDep boolean Automatically removes unused dependencies. (Needs depCheck enabled) true
--autoInstallTypes boolean Automatically installs missing dependencies @types/. (Needs depCheck and autoInstallDep enabled) true
--autoRemoveTypes boolean Automatically removes unused dependencies @types/. (Needs depCheck and autoRemoveDep enabled) true
--autoUpdateOutdated boolean Automatically update outdated dependencies to their latest version. (Needs depCheck enabled) false
--autoUpdateDeprecated boolean Automatically update deprecated dependencies to their latest version. (Needs depCheck enabled) false
--updateSelector boolean Whether or not to show the update selector for deprecated or outdated dependencies. (Needs depCheck enabled) true
--todoCheck boolean Whether or not to check for TODO's.
--todoTags string Custom tags to include in the TODO check. (String list seperated by commas)
--copyOnly boolean Whether or not only to copy the files from src to out. false
--ignore string Files that should be ignored when watching files. (glob pattern)
--include string Files that should be included when watching files. (glob pattern)
--silent boolean Whether or not to print console logs. false

ts-devscript's People

Contributors

bas950 avatar dependabot[bot] avatar i1u5 avatar imgbotapp avatar renovate[bot] avatar snazzah avatar timeraa avatar xhayper avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

ts-devscript's Issues

Error starting nodejs program after compile.

I get the following error every time I try to start-up ts-devscript with or without administrator perms on Windows 11. I get this error after it has compiled the program fully.

Error: spawn C:\Program Files\nodejs\node.exe ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
    at onErrorNT (internal/child_process.js:465:16)
    at processTicksAndRejections (internal/process/task_queues.js:80:21)

[BUG] Unused module, but it's actually used in package.json

Hey Tim,

I have been using the module for a long time now and I just updated it to the latest version and saw the unused dependency check feature. It's neat and I love it but there's one thing, it doesn't look for the scripts in package.json. I use a module to move files from a location to a different location with that package but DevScript says I don't use it (and I don't, at least it is never imported in code).

image
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.