diff --git a/package.json b/package.json index 9c43b9d..9ab7350 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "files": [ - "dist" + "/dist" ], "scripts": { "build": "rm -rf ./dist/ && tsc", diff --git a/src/index.ts b/src/index.ts index 829df1d..e97cd36 100644 --- a/src/index.ts +++ b/src/index.ts @@ -7,4 +7,16 @@ export { default as StaticModelValidator } from './validation/validators/staticM export { default as CustomValidator } from './validation/validators/customValidator' export { default as InclusionValidator } from './validation/validators/inputValidators/inclusionValidator' export { default as NumberValidator } from './validation/validators/inputValidators/numberValidator' -export { default as StringValidator } from './validation/validators/inputValidators/stringValidator' \ No newline at end of file +export { default as StringValidator } from './validation/validators/inputValidators/stringValidator' + +/* Export all the types */ +// Export the data types +export { ActiveDataScheme, ActiveDataSchema} from './types/data/activeDataSchema' +export { DefaultRow } from './types/data/tables' + +// Export the model types +export { ModelError, ListError, Condition } from './types/models/model' + +// Export validation types +export { Schema } from './types/validation/schema' +export { ValidatorOptions, StringValidatorOptions, NumberValidatorOptions, InclusionValidatorOptions, ValidatorInterface } from './types/validation/validator' diff --git a/src/types/index.d.ts b/src/types/index.d.ts deleted file mode 100644 index 9a2a04d..0000000 --- a/src/types/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -// Export the data types -export { ActiveDataScheme, ActiveDataSchema} from './data/activeDataSchema' -export { DefaultRow } from './data/tables' - -// Export the model types -export { ModelError, ListError, Condition } from './models/model' - -// Export validation types -export { Schema } from './validation/schema' -export { ValidatorOptions, StringValidatorOptions, NumberValidatorOptions, ValidatorInterface } from './validation/validator' diff --git a/tsconfig.json b/tsconfig.json index b760816..80f8dfe 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,7 +11,7 @@ // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ /* Language and Environment */ - "target": "ES2019", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + "target": "ES2019", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ // "jsx": "preserve", /* Specify what JSX code is generated. */ // "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */ @@ -25,7 +25,7 @@ /* Modules */ "module": "commonjs", /* Specify what module code is generated. */ - "rootDir": "./src", /* Specify the root folder within your source files. */ + // "rootDir": "./", /* Specify the root folder within your source files. */ // "moduleResolution": "node", /* Specify how TypeScript looks up a file from a given module specifier. */ // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ @@ -45,7 +45,7 @@ "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ // "declarationMap": true, /* Create sourcemaps for d.ts files. */ // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */ - "sourceMap": true, /* Create source map files for emitted JavaScript files. */ + // "sourceMap": true, /* Create source map files for emitted JavaScript files. */ // "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. */ "outDir": "./dist", /* Specify an output folder for all emitted files. */ // "removeComments": true, /* Disable emitting comments. */ @@ -97,6 +97,10 @@ // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ "skipLibCheck": true /* Skip type checking all .d.ts files. */ }, - "include": ["src"], - "exclude": ["node_modules"] + "include": [ + "src/**/*" + ], + "exclude": [ + "node_modules" + ] }