Skip to content

Commit

Permalink
feat: rework asset globbing
Browse files Browse the repository at this point in the history
* Assets now defined in config vs. separate file
* Updated glob library to latest version.  Newer version has built in support for globbing multiple patterns at once.
* Removed multi-glob pattern processing code.
* globbing now handled on demand by the code that needs it.
  • Loading branch information
jrassa committed Feb 6, 2024
1 parent f787117 commit 10d9501
Show file tree
Hide file tree
Showing 13 changed files with 641 additions and 172 deletions.
13 changes: 0 additions & 13 deletions config/assets.js

This file was deleted.

10 changes: 10 additions & 0 deletions config/env/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ module.exports = {
/**
* Core System Settings
*/
assets: {
models: ['src/**/*.model!(.spec).{js,ts}'],
routes: ['src/**/*.routes!(.spec).{js,ts}'],
sockets: ['src/**/*.socket!(.spec).{js,ts}'],
config: ['src/**/*.config!(.spec).js'],
docs: ['src/**/*/*.components.yml'],
// Test specific source files
tests: ['src/**/*.spec.{js,ts}'],
e2e: ['e2e/**/*.spec.{js, ts}']
},

/**
* When using the 'proxy-pki' authentication strategy,
Expand Down
2 changes: 1 addition & 1 deletion config/env/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = {

// Use a test db so we don't modify the real DB
db: {
admin: 'mongodb://localhost/node-rest-starter-test'
admin: 'mongodb://127.0.0.1/node-rest-starter-test'
},

// Run tests on something other than default port
Expand Down
Loading

0 comments on commit 10d9501

Please sign in to comment.