Skip to content

Commit

Permalink
Merge pull request #4 from JPDovale/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
JPDovale authored Oct 24, 2023
2 parents b0449d3 + 93d5799 commit d0232dc
Show file tree
Hide file tree
Showing 67 changed files with 11,140 additions and 5,161 deletions.
2 changes: 2 additions & 0 deletions .erb/configs/webpack.config.main.prod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ import baseConfig from './webpack.config.base';
import webpackPaths from './webpack.paths';
import checkNodeEnv from '../scripts/check-node-env';
import deleteSourceMaps from '../scripts/delete-source-maps';
import copyMigrations from '../scripts/copy-migrations';

checkNodeEnv('production');
deleteSourceMaps();
copyMigrations();

const configuration: webpack.Configuration = {
devtool: 'source-map',
Expand Down
17 changes: 17 additions & 0 deletions .erb/scripts/copy-migrations.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import fs from 'fs';
import path from 'node:path';
import webpackPaths from '../configs/webpack.paths';

export default function copyMigrations() {
if (
!fs.existsSync(path.join(webpackPaths.srcPath, 'database', 'migrations'))
) {
throw new Error('Migrations of db does not prided ');
}

fs.cpSync(
path.join(webpackPaths.srcPath, 'database', 'migrations'),
path.join(webpackPaths.distMainPath, 'migrations'),
{ recursive: true }
);
}
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
save-exact=true
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
## 0.0.1

## 0.1.0

### Minor Changes

- Switing to sqlite 3

## 0.0.3

### Patch Changes
Expand Down
674 changes: 674 additions & 0 deletions assets/eula.txt

Large diffs are not rendered by default.

22 changes: 22 additions & 0 deletions knexfile.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { getDatabasePath } from '@config/files/getDatabasePath';
import type { Knex } from 'knex';
import path from 'path';

// Update with your config settings.

const config: { [key: string]: Knex.Config } = {
development: {
client: 'sqlite3',
connection: {
filename: `${getDatabasePath()}/db.sqlite3`,
database: 'magiscrita',
},
migrations: {
tableName: 'knex_migrations',
directory: `${path.join(__dirname, 'src', 'database', 'migrations')}`,
},
useNullAsDefault: true,
},
};

module.exports = config;
Loading

0 comments on commit d0232dc

Please sign in to comment.