farend / redmine_theme_farend_bleuclair

Custom theme for Redmine. Compatible with: Redmine 3.4 - 5.0
GNU General Public License v2.0
109 stars 19 forks source link

Removes unneeded dependencies, upgrades existing ones #69

Closed dkastl closed 1 year ago

dkastl commented 1 year ago

This pull requests improves the following:

Removal of node-sass dependency

There was an error installing node-sass on my environment (Ubuntu 23.04). Some research showed that the library is deprecated and a migration to Dart SASS is easy: https://sass-lang.com/blog/libsass-is-deprecated/#how-do-i-migrate

In fact, Dart SASS was already in package.json as sass.

Removal of unneeded dependencies

It seems that a few dev dependencies are not used, so I removed them from package.json.

Minor version upgrades

A few dependencies have updated versions available.

sanak commented 1 year ago

@dkastl (CC: @ishikawa999) Thanks! I confirmed the followings on my macOS Ventura 13.5.2 (M1) and Ubuntu 22.04 asdf Node.js v18.18.0 environments.

  1. Execute npm install.

    • macOS:

      ```zsh % npm install added 415 packages, and audited 416 packages in 3s 53 packages are looking for funding run `npm fund` for details found 0 vulnerabilities ```
    • Ubuntu:

      ```bash $ npm install added 414 packages, and audited 415 packages in 3s 53 packages are looking for funding run `npm fund` for details found 0 vulnerabilities ```
  2. Execute npm run build after removing updating files (to make sure files will be generated), then check diff by git diff

    • macOS:

      ```zsh % rm -f javascripts/theme.js stylesheets/theme.css % npm run build > bleuclair@0.4.4 build > webpack --mode=production asset ../stylesheets/theme.css 57.1 KiB [emitted] [minimized] (name: main) 1 related asset asset theme.js 7.41 KiB [emitted] (name: main) 1 related asset Entrypoint main 64.5 KiB (132 KiB) = ../stylesheets/theme.css 57.1 KiB theme.js 7.41 KiB 2 auxiliary assets orphan modules 190 KiB (javascript) 997 bytes (runtime) [orphan] 8 modules runtime modules 718 bytes 3 modules cacheable modules 4.61 KiB (javascript) 61 KiB (css/mini-extract) ./src/index.js 202 bytes [built] [code generated] ./src/scripts/bleuclair.js 4.41 KiB [built] [code generated] css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].use[3]!./src/styles/bleuclair.scss 61 KiB [built] [code generated] webpack 5.88.2 compiled successfully in 1633 ms % git diff % ```
    • Ubuntu:

      ```bash $ rm -f javascripts/theme.js stylesheets/theme.css $ npm run build > bleuclair@0.4.4 build > webpack --mode=production asset ../stylesheets/theme.css 57.1 KiB [emitted] [minimized] (name: main) 1 related asset asset theme.js 7.41 KiB [emitted] (name: main) 1 related asset Entrypoint main 64.5 KiB (132 KiB) = ../stylesheets/theme.css 57.1 KiB theme.js 7.41 KiB 2 auxiliary assets orphan modules 190 KiB (javascript) 997 bytes (runtime) [orphan] 8 modules runtime modules 718 bytes 3 modules cacheable modules 4.61 KiB (javascript) 61 KiB (css/mini-extract) ./src/index.js 202 bytes [built] [code generated] ./src/scripts/bleuclair.js 4.41 KiB [built] [code generated] css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].use[3]!./src/styles/bleuclair.scss 61 KiB [built] [code generated] webpack 5.88.2 compiled successfully in 2113 ms $ git diff $ ```

There was no installation error and generated files (theme.js and theme.css) are completely same as original ones, so I think that this PR is safe to merge.

ishikawa999 commented 1 year ago

@dkastl Thank you for the pull request. I've tested it in my environment and had no issues with installation. The results of npm run build were also problem-free, so I will merge it. I appreciate your contribution.

@sanak Thank you for helping with the verification.