diff --git a/.eslintrc.json b/.eslintrc.json index 2bc2eb9..12d726a 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -40,5 +40,5 @@ "no-unused-vars": "off", "@typescript-eslint/no-unused-vars": "error" }, - "ignorePatterns": "lib/*" + "ignorePatterns": "dist/*" } \ No newline at end of file diff --git a/.gitignore b/.gitignore index 4529c79..ceacbb6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ .DS_Store node_modules/* .tmuxp.* -lib/* +dist/* diff --git a/package-lock.json b/package-lock.json index 6830e26..ada5dc6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,7 +7,7 @@ "": { "name": "ccs-prototype-kit-model-interface", "version": "0.0.1", - "license": "ISC", + "license": "MIT", "devDependencies": { "@types/express": "^4.17.13", "@types/express-session": "^1.17.4", diff --git a/package.json b/package.json index 95ec4ce..9c43b9d 100644 --- a/package.json +++ b/package.json @@ -2,10 +2,14 @@ "name": "ccs-prototype-kit-model-interface", "version": "0.0.1", "description": "An interface for the ccs-prototype-kit to allow for the use of a sudo database and models", - "main": "src/index", - "types": "", + "main": "dist/index.js", + "types": "dist/index.d.ts", + "files": [ + "dist" + ], "scripts": { - "build": "rm -rf ./lib/ && tsc", + "build": "rm -rf ./dist/ && tsc", + "prepare": "npm run build", "test": "echo \"Error: no test specified\" && exit 1" }, "keywords": [], diff --git a/src/@types/frameworkConfig.ts b/src/@types/frameworkConfig.ts index cbc710c..d933f31 100644 --- a/src/@types/frameworkConfig.ts +++ b/src/@types/frameworkConfig.ts @@ -1,6 +1,6 @@ -type AppConfig = { +type FrameworkConfig = { staticDataPath: string activeDataSchemaPath: string } -export default AppConfig \ No newline at end of file +export default FrameworkConfig \ No newline at end of file diff --git a/src/@types/index.ts b/src/@types/index.ts new file mode 100644 index 0000000..a4e7391 --- /dev/null +++ b/src/@types/index.ts @@ -0,0 +1,10 @@ +// 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' \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index 0309605..39bc97d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -47,7 +47,7 @@ // "emitDeclarationOnly": true, /* Only output d.ts files and not 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": "./lib", /* Specify an output folder for all emitted files. */ + "outDir": "./dist", /* Specify an output folder for all emitted files. */ // "removeComments": true, /* Disable emitting comments. */ // "noEmit": true, /* Disable emitting files from a compilation. */ // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */ @@ -96,5 +96,7 @@ /* Completeness */ // "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", "dist"] }