Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
build: git hook updates

* Update husky and lint-staged to latest version
* add post-checkout hook to automatically copy config/development.template.js to config/development.js if it does not already exist.
* updates to development.template.js
  • Loading branch information
jrassa committed Mar 5, 2024
1 parent 38a4dc0 commit 14baeba
Show file tree
Hide file tree
Showing 6 changed files with 584 additions and 429 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

# Config Files
/config/development.js
/config/dev-sender.js
/config/development-*.js

# Packages
Expand Down
4 changes: 4 additions & 0 deletions .husky/post-checkout
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
if ! test -f config/development.js; then
echo "config/development.js not found. Creating from template..."
cp config/development.template.js config/development.js
fi
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
45 changes: 39 additions & 6 deletions config/development.template.js
Original file line number Diff line number Diff line change
@@ -1,33 +1,66 @@
'use strict';

/**
* Copy this file to 'development.js' and selectively pull in first-level properties
* Copy this file to 'development.js' and selectively pull in properties
* to override the properties in 'default.js'.
*/
module.exports = {
mode: 'development',

// Basic title and instance name
app: {
title: 'Node REST Starter (Development Settings)',
clientUrl: 'http://localhost:4200/#',
helpUrl: 'http://localhost:4200/#/help'
},

/**
* System Settings
* Core System Settings
*/

// MongoDB
db: {
admin: 'mongodb://127.0.0.1/node-rest-starter-dev'
},
mongooseFailOnIndexOptionsConflict: false,

/**
* Environment Settings
*/

// Configuration for outgoing mail server
mailer: {
provider: './src/app/core/email/providers/log-email.provider'
},

/**
* Development/debugging settings
*/

mongooseLogging: false,
expressLogging: false,
exposeServerErrors: true,

/**
* Logging Settings
*/

logger: {
application: [
// Console logger
{
stream: 'process.stdout',
level: 'debug'
}
]
},

/**
* Not So Environment-Specific Settings
* UI Settings
*/
// Header/footer
banner: {
// The string to display
html: 'DEVELOPMENT SETTINGS',

// additional CSS class to apply to the banner
style: 'default'
}
};
Loading

0 comments on commit 14baeba

Please sign in to comment.