Creating every single Typescript project environment is a real pain. Takes lots of minutes, sufferings and procrastinations to leave it functional and in the way I feel confortable to work with. We know how boring it really is.
Also, having to manage the eslint of each project and not knowing which one I've updated last, also causes some anxiety.
npx package saves me some good hours of life, so I can watch more videos of cute dogs before I die.
Made it for me and my projects, but can also work really well for you. It's fast, simple and good.
npx gev to use the current directory as destination and package name. Directory emptiness will be checked.
npx gev <packageName> to create a new directory and use it as the package name. Will check if a directory with same name already exists.
As it accepts scoped package names like
npx gev @yourUsername/coolPackage, it is not possible to specify a path in the package name, like
- Check if the package name is valid
npm init -yand do some changes on package.json:
- Set version to 0.1.0, as 1.0.0 on stable release
- Add common
- Whitelist publish files with
npm i -D typescript [...eslint packages] rimraf
- Set the .eslintrc and use my
@srbrahma/elint-configI've been configuring through some years
rimrafas dev dep for cross-platform erasing the
cleannpm script. Common practice.
tsc --initfor the latest options
- Change some tsconfigs (source map, declaration files, outDir=dist, resolveJsonModule etc)
- Create basic .gitignore, .eslintignore
- README.md and CHANGELOG.md with template and some initial infos
- Create src/index.ts
You may want to read each file in src/resources, or just initialize a project to see the final files.
--react-nativeflavors as arguments, for further options to the eslint and tsconfig.
Add Paypal donate button to the end of READMEs (or as a badge). Money! It could check if I am the npx caller. Else, maybe shouldn't be a good idea to add that button with my link.
Interactive menu to add other badges and the paypal button to the README.
typedoc support, with markdown output. I hate writing READMEs!
Allow custom setups. It could be something like
npx gev -u githubUsername. This could really be a good way for people to have their own environment setup without too much work.
It could use the npm initializer, like
npm init gev. But for now I will stick to the
npx gev. Shorter!