@wwwouter/typed-knex-generator
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

@wwwouter/typed-knex-generator

typedknexgeneratorfile.js

module.exports = {
    knex: {
        client: 'postgresql',
        connection: {
            database: 'db',
            user: 'user',
            password: 'pw'
        },
    },
    generator: {
        entityNameConversion: {
            inflections: ['pascalCase', 'singular'],
            overrides: [
                { tableName: "objects", override: "specialObjects" }
            ]
        },
        ignoreTables: [
            'geography_columns', 'geometry_columns', 'raster_columns', 'raster_overviews.o_table_catalog', 'raster_overviews', 'spatial_ref_sys',
            'knex_migrations_lock', 'knex_migrations',
            'session'],
        classFilePath: 'src/backend/controllers/<%= inflect(tableName, ["singular"]) %>',
    }

};


npx @wwwouter/typed-knex-generator

Test

npm test

Update version

npm version major|minor|patch
npm publish --access public
git push

Package Sidebar

Install

npm i @wwwouter/typed-knex-generator

Weekly Downloads

0

Version

0.0.4

License

MIT

Unpacked Size

341 kB

Total Files

88

Last publish

Collaborators

  • wwwouter