Skip to content

Commit 76ee231

Browse files
tech: update package scripts
1 parent 252c649 commit 76ee231

File tree

3 files changed

+18
-111
lines changed

3 files changed

+18
-111
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,4 @@ typings/
6464
package-lock.json
6565

6666
# generated files
67-
index.js
67+
dist

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
"name": "react-native-otp-textinput",
33
"version": "1.0.1",
44
"description": "Textview usable for OTP implementation",
5-
"main": "index.js",
5+
"main": "dist/index.js",
6+
"types": "dist/index.d.ts",
67
"scripts": {
78
"test": "echo \"Error: no test specified\" && exit 1",
89
"build": "tsc",
9-
"watch:build": "tsc --watch"
10+
"watch:build": "tsc --watch",
11+
"prepare": "npm run build"
1012
},
1113
"keywords": [
1214
"react-native",

tsconfig.json

Lines changed: 13 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -1,114 +1,19 @@
11
{
22
"compilerOptions": {
3-
"jsx": "react",
4-
/* Visit https://aka.ms/tsconfig to read more about this file */
5-
6-
/* Projects */
7-
// "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
8-
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
9-
// "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
10-
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
11-
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
12-
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
13-
14-
/* Language and Environment */
15-
"target": "ESNext" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
16-
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
17-
// "jsx": "preserve", /* Specify what JSX code is generated. */
18-
// "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */
19-
// "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
20-
// "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
21-
// "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
22-
// "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
23-
// "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
24-
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
25-
// "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
26-
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
27-
28-
/* Modules */
29-
"module": "ESNext" /* Specify what module code is generated. */,
30-
// "rootDir": "./", /* Specify the root folder within your source files. */
31-
"moduleResolution": "node" /* Specify how TypeScript looks up a file from a given module specifier. */,
32-
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
33-
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
34-
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
35-
// "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
36-
// "types": [], /* Specify type package names to be included without being referenced in a source file. */
37-
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
38-
// "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
39-
// "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */
40-
// "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */
41-
// "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */
42-
// "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */
43-
// "resolveJsonModule": true, /* Enable importing .json files. */
44-
// "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
45-
// "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
46-
47-
/* JavaScript Support */
48-
// "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
49-
// "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
50-
// "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
51-
52-
/* Emit */
53-
// "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
54-
// "declarationMap": true, /* Create sourcemaps for d.ts files. */
55-
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
56-
// "sourceMap": true, /* Create source map files for emitted JavaScript files. */
57-
// "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
58-
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
59-
// "outDir": "./", /* Specify an output folder for all emitted files. */
60-
// "removeComments": true, /* Disable emitting comments. */
61-
// "noEmit": true, /* Disable emitting files from a compilation. */
62-
// "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
63-
// "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */
64-
// "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
65-
// "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
66-
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
67-
// "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
68-
// "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
69-
// "newLine": "crlf", /* Set the newline character for emitting files. */
70-
// "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
71-
// "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
72-
// "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
73-
// "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
74-
// "declarationDir": "./", /* Specify the output directory for generated declaration files. */
75-
// "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
76-
77-
/* Interop Constraints */
78-
// "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
79-
// "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */
80-
// "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
81-
"esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */,
82-
// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
83-
"forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
84-
85-
/* Type Checking */
86-
"strict": true /* Enable all strict type-checking options. */,
87-
// "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
88-
// "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
89-
// "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
90-
// "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
91-
// "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
92-
// "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
93-
// "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
94-
// "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
95-
// "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
96-
// "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
97-
// "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
98-
// "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
99-
// "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
100-
// "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
101-
// "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
102-
// "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
103-
// "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
104-
// "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
105-
106-
/* Completeness */
107-
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
108-
"skipLibCheck": true /* Skip type checking all .d.ts files. */,
3+
"jsx": "react-native",
4+
"declaration": true,
5+
"target": "ESNext",
6+
"module": "ESNext",
7+
"moduleResolution": "node",
8+
"esModuleInterop": true,
9+
"forceConsistentCasingInFileNames": true,
10+
"strict": true,
10911
"paths": {
11012
"react-native": ["./node_modules/react-native"]
111-
}
112-
}
13+
},
14+
"skipLibCheck": true,
15+
"outDir": "dist"
16+
},
17+
"exclude": ["node_modules", "Example", "dist", "ScreenShots"]
11318
}
11419

0 commit comments

Comments
 (0)