Last active
April 26, 2021 13:43
-
-
Save nicolasmendonca/e9f579230c55a2e0add9bea3b5c681af to your computer and use it in GitHub Desktop.
Create react npm package
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"printWidth": 160, | |
"tabWidth": 2, | |
"useTabs": false, | |
"semi": true, | |
"singleQuote": true, | |
"trailingComma": "es5", | |
"bracketSpacing": true, | |
"jsxBracketSameLine": false, | |
"arrowParens": "always" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
presets: [['@babel/preset-env', {targets: {node: 'current'}}], '@babel/preset-typescript'], | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "app-name", | |
"version": "1.0.0", | |
"main": "dist/index.js", | |
"license": "MIT", | |
"scripts": { | |
"watch": "tsc --watch", | |
"build": "rimraf dist && tsc", | |
"test": "jest" | |
}, | |
"files": [ | |
"dist" | |
], | |
"devDependencies": { | |
"@babel/core": "^7.13.16", | |
"@babel/plugin-transform-modules-commonjs": "^7.10.4", | |
"@babel/preset-env": "^7.13.15", | |
"@babel/preset-typescript": "^7.13.0", | |
"babel-jest": "^26.6.3", | |
"rimraf": "^3.0.2" | |
}, | |
"jest": { | |
"modulePathIgnorePatterns": [ | |
"<rootDir>/dist" | |
] | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// .vscode/settings.json | |
{ | |
"editor.formatOnPaste": true, | |
"editor.formatOnSave": true, | |
"editor.defaultFormatter": "esbenp.prettier-vscode", | |
"editor.tabSize": 2, | |
"editor.insertSpaces": true, | |
"editor.detectIndentation": false | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"compilerOptions": { | |
"baseUrl": ".", | |
"paths": { | |
"components/*": ["./src/components/*"], // OPTIONAL: config for resolving absolute paths | |
"context/*": ["./src/context/*"] // OPTIONAL: config for resolving absolute paths | |
}, | |
"outDir": "dist", | |
"module": "esnext", | |
"lib": ["dom", "esnext"], | |
"moduleResolution": "node", | |
"jsx": "react", | |
"sourceMap": true, | |
"declaration": true, | |
"esModuleInterop": true, | |
"noImplicitReturns": true, | |
"noImplicitThis": true, | |
"noImplicitAny": true, | |
"strictNullChecks": true, | |
"suppressImplicitAnyIndexErrors": true, | |
"allowSyntheticDefaultImports": true | |
}, | |
"include": ["src"], | |
"exclude": ["node_modules", "dist", "example"] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"extends": "./tsconfig.json", | |
"compilerOptions": { | |
"module": "commonjs" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment