Skip to content

Commit

Permalink
fix(config,lib): fix assets allJs files 🐛
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreBrisorgueil committed Jun 9, 2019
1 parent f06e1c6 commit 452ee92
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion config/assets.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint comma-dangle:[0, "only-multiline"] */
module.exports = {
gulpConfig: ['gulpfile.js'],
allJS: ['server.js', 'config/**/*.js', 'modules/*/**/*.js'],
allJS: ['server.js', 'config/**/*.js', 'lib/**/*.js', 'modules/*/**/*.js'],
mongooseModels: 'modules/*/models/*.mongoose.js',
sequelizeModels: 'modules/*/models/*.sequelize.js',
routes: ['modules/!(core)/routes/*.js', 'modules/core/routes/*.js'],
Expand Down
2 changes: 2 additions & 0 deletions lib/services/logger.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ const validFormats = ['combined', 'common', 'dev', 'short', 'tiny', 'custom'];

// Instantiating the default winston application logger with the Console
// transport

/* eslint new-cap: 0 */
const logger = new winston.createLogger({
transports: [
new winston.transports.Console({
Expand Down
11 changes: 5 additions & 6 deletions lib/services/sequelize.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
const path = require('path');
const Sequelize = require('sequelize');
const config = require('../config');
const config = require('../../config');

const orm = {};
let sequelize;
Expand Down Expand Up @@ -41,17 +41,16 @@ if (config.orm) {
// Expose the global Sequelize library
orm.Sequelize = Sequelize;

orm.sync = function () {
orm.sync = () => {
// Sync makes sure the database tables are created if they don't exist
return this.sequelize.sync({
this.sequelize.sync({
force: (config.seedDB.reset || false),
});
};

orm.seed = function () {
orm.seed = () => {
// Sync makes sure the database tables are created if they don't exist
// and the `force` parameter will also drop the tables before re-creating them
return this.sequelize.sync({ force: true });
this.sequelize.sync({ force: true });
};
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"testCoveralls": "cross-env NODE_ENV=test gulp testCoverage && cat ./coverage/lcov.info | coveralls",
"seedDev": "cross-env NODE_ENV=development gulp seed",
"seedProd": "cross-env NODE_ENV=production gulp seed",
"generateSSLCerts": "lib/scripts/generate-ssl-certs.sh",
"generateSSLCerts": "scripts/generate-ssl-certs.sh",
"lint": "gulp lint",
"snyk-protect": "snyk protect",
"prepare": "npm run snyk-protect",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 452ee92

Please sign in to comment.