Skip to content

Commit

Permalink
bugfix: wrong loading methods order (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
bleto authored Jan 7, 2022
1 parent 21d628c commit 2948a1d
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 15 deletions.
15 changes: 13 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,27 @@

module.exports = {
env: {
browser: true,
es6: true,
node: true,
},
parser: 'babel-eslint',
parser: '@babel/eslint-parser',
parserOptions: {
sourceType: 'module',
allowImportExportEverywhere: false,
requireConfigFile: false,
ecmaFeatures: {
jsx: true,
modules: true,
},
},
plugins: ['notice', 'prettier'],
plugins: ['react', 'react-hooks', 'notice', 'prettier'],
extends: ['airbnb', 'prettier'],
settings: {
react: {
version: '17.0.2',
},
},
rules: {
'prettier/prettier': [
'error',
Expand Down
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ergonode/vuems",
"version": "1.0.1",
"version": "1.1.0",
"description": "A simple mechanism to transform a monolithic Vue application into an application based on Micro Services architecture.",
"author": "Bletek Piotr <[email protected]>",
"license": "OSL-3.0",
Expand Down Expand Up @@ -49,17 +49,18 @@
"recursive-readdir-async": "^1.2.0"
},
"devDependencies": {
"@babel/core": "^7.16.7",
"@babel/eslint-parser": "^7.16.5",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"babel-eslint": "^10.1.0",
"babel-plugin-dynamic-import-node": "^2.3.3",
"eslint": "^8.4.0",
"eslint-config-airbnb": "^19.0.2",
"eslint": "^8.6.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-notice": "^0.9.10",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.27.1",
"eslint-plugin-react": "^7.28.0",
"eslint-plugin-react-hooks": "^4.3.0",
"prettier": "^2.5.1"
}
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

import { resolve as resolvePath, join as joinPath } from 'path';
import { list } from 'recursive-readdir-async'
import { list } from 'recursive-readdir-async';
import { existsSync, remove, ensureSymlink, chmod } from 'fs-extra';
import { success } from 'consola';
import { DEFAULTS, DIRECTORIES } from './constants';
Expand Down
10 changes: 5 additions & 5 deletions src/utils/beforeAll.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ function checkRequiredModules({ allModules, required }) {
*/
export default async function beforeModules({ options }) {
const { verbose } = options;
const logs = await Promise.all([
symlinksCreator(options),
checkDirectories(options),
checkRequiredModules(options),
]);
const logs = [];

logs.push(await symlinksCreator(options));
logs.push(await checkDirectories(options));
logs.push(await checkRequiredModules(options));

if (verbose) {
log({
Expand Down
4 changes: 3 additions & 1 deletion src/utils/initModules.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ import { DEFAULT_ORDER } from '../helpers/constants';
function loadModules({ modules, options, configurations }) {
const setOrder = (data) => ({
...data,
order: configurations.find((m) => m.name === data.name).order || DEFAULT_ORDER,
order:
configurations.find((m) => m.name === data.name).order ||
DEFAULT_ORDER,
});
const sortByOrder = (a, b) => a.order - b.order;
const loadModule = async ({ name, path }) => {
Expand Down

0 comments on commit 2948a1d

Please sign in to comment.