Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overall code refactoring (ES Modules) + Update gulp and other dev dependencies #35

Draft
wants to merge 69 commits into
base: dev
Choose a base branch
from

Conversation

Raruto
Copy link
Collaborator

@Raruto Raruto commented Jun 9, 2022

WIP, integrates and superseed: #34

  • overall replace function prototypes with native javascript classes
  • overall replace commonjs require() with native import() modules
  • refactor gulpfile.js and update to support gulp v4
  • refactor config.template.js (rename some variables, add comments and use fewer nested structures)
  • remove thousands of unused dev dependencies
  • remove preinstall hook (no more npm-force-resolutions)
  • rename some npm scripts to use a more common nomeclature (see: npm run dev and npm run build)
  • remove gulp task g3w-admin:client_only
  • rename some gulp tasks to use shorter names
  • remove useless path.join within gulpfile.js (nowdays filesystem scripts still works without this hack on Windows OS)
  • upgrade babel to version 7
  • add esmify package to enable support of ES6 modules within browserify
  • remove .babelrc and .browserslistrc files (related config are now listed within the package.json)
  • rename index.html templates (see: index.dev.html and index.prod.html)
  • split i18n config into multiple language files
  • install and configure eslint 8
  • apply airbnb style rules (see: eslint-config-airbnb-base)
  • avoid calling the super () constructor when not strictly necessary within javascript classes
  • avoid importing local files by relatively traversing project directories (eg. import foo from '../../../foo')
  • remove useful boostrap() function closure within main.js
  • remove useful test property within api.js
  • remove useful G3W_VERSION and production variable within applicationservice.js
  • updata update version to 4.0.0. within package.json
  • create gui/component folder and move related gui components inside that
  • replace _.forEach with Object.entries().forEach
  • remove src/g3w-ol/src folder (replaced with src/g3w-ol)

To be performed (not yet completed)

  • make use of vue single component (consolidate *.js and *.html files into a single .vue file)

@Raruto Raruto changed the base branch from migration_v3_v4 to dev June 9, 2022 13:06
@Raruto Raruto marked this pull request as draft June 9, 2022 13:21
volterra79 and others added 26 commits June 16, 2022 14:53
const reg = new RegExp(`qgs:${sanitizeLayerName}\\b`, "g"); => const reg = new RegExp(`qgs:${sanitizeLayerName}`, "g");
- remove dead code and comments
- remove useful `bootstrap()` function closure
- simplify error variable parsing
- make use of "ApplicationTemplate" variable instead of reassining default export from `gui/app/index` to `Application`
- remove temporary `g3w` const variable (use default export instead)
- remove unusued `test` property
@Raruto Raruto added the dependencies Pull requests that update a dependency file label Jul 28, 2022
@Raruto Raruto added this to the 4.0 milestone Jul 29, 2022
Raruto added a commit that referenced this pull request Aug 12, 2022
a partial refactor is actually needed (or at least suggested) before complete #68

based on #35
@Raruto Raruto mentioned this pull request Aug 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants