Common typescript config
npm i -D bitaccess/ts-config
Extend the files needed.
jest.config.js
const base = require('@bitaccess/ts-config/library/jest.config.js')
module.exports = Object.assign({}, base, {
// overrides here
})
tsconfig.json
{
"extends": "@bitaccess/ts-config/library/tsconfig.json",
"compilerOptions": {
"baseUrl": ".",
"outDir": "dist/lib",
"declarationDir": "dist/types",
"paths": {
"#/*": ["./src/*"],
}
},
"exclude": ["node_modules", "dist"]
}
To initialize a new project from scratch copy the entire template directory. If migrating an existing project you'll need to copy over only desired files manually to avoid overwriting src and package.json.
cp -r ./template/library/. /path/to/empty/project
cp -r ./template/server/. /path/to/empty/project
cp -r ./template/react/. /path/to/empty/project