Skip to content

TagSpaces is an offline, open source, document manager with tagging support

chore: removing sass, cleaning up webpack configs

Ilian Sapundshieveb41a50974be
diff --git a/.erb/configs/webpack.config.base.ts b/.erb/configs/webpack.config.base.ts
index 01324b419..17583cc9c 100644
--- a/.erb/configs/webpack.config.base.ts
+++ b/.erb/configs/webpack.config.base.ts
@@ -2,14 +2,13 @@
* Base webpack config used across other specific configs
*/
+import path from 'path';
import TsconfigPathsPlugins from 'tsconfig-paths-webpack-plugin';
import webpack from 'webpack';
import { TsMetaPlugin } from '../../plugins/TsMetaPlugin';
import { dependencies as externals } from '../../release/app/package.json';
import webpackPaths from './webpack.paths';
const Dotenv = require('dotenv-webpack');
-//import NodePolyfillPlugin from 'node-polyfill-webpack-plugin';
-import path = require('path');
const configuration: webpack.Configuration = {
// packages that is not included in the bundle
@@ -74,7 +73,6 @@ const configuration: webpack.Configuration = {
'@tagspaces/tagspaces-common/default.env',
),
}),
- //new NodePolyfillPlugin(),
new TsMetaPlugin(),
],
};
diff --git a/.erb/configs/webpack.config.cordova.dev.ts b/.erb/configs/webpack.config.cordova.dev.ts
index 19abcda62..6ff0f71b2 100644
--- a/.erb/configs/webpack.config.cordova.dev.ts
+++ b/.erb/configs/webpack.config.cordova.dev.ts
@@ -1,5 +1,5 @@
/**
- * Build config for electron renderer process
+ * Build config for cordova development
*/
import HtmlWebpackPlugin from 'html-webpack-plugin';
@@ -8,23 +8,15 @@ import path from 'path';
import webpack from 'webpack';
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
import merge from 'webpack-merge';
-//import NodePolyfillPlugin from 'node-polyfill-webpack-plugin';
import baseConfig from './webpack.config.base';
import webpackPaths from './webpack.paths';
-// import CheckNodeEnv from '../internals/scripts/CheckNodeEnv';
-// CheckNodeEnv('development');
const configuration: webpack.Configuration = {
cache: false,
devtool: 'inline-source-map',
-
mode: 'development',
-
target: 'web',
-
- //entry: path.join(__dirname, '..', 'app/index'),
entry: path.join(webpackPaths.srcRendererPath, 'index.tsx'),
- // entry: ['babel-polyfill', './app/index'],
output: {
libraryTarget: 'window', // 'window', // 'commonjs2',
@@ -34,49 +26,49 @@ const configuration: webpack.Configuration = {
sourceMapFilename: '[file].map',
},
- /*node: {
- fs: 'empty',
- child_process: 'empty'
- },*/
-
module: {
rules: [
- // Extract all .global.css to style.css as is
{
- test: /\.global\.css$/,
- use: [
- {
- loader: MiniCssExtractPlugin.loader,
- options: {
- publicPath: './',
- },
- },
- {
- loader: 'css-loader',
- options: {
- sourceMap: true,
- },
- },
- ],
+ test: /\.css$/,
+ use: ['style-loader', 'css-loader'],
+ exclude: /\.module\.s?(c|a)ss$/,
},
+ // Extract all .global.css to style.css as is
+ // {
+ // test: /\.global\.css$/,
+ // use: [
+ // {
+ // loader: MiniCssExtractPlugin.loader,
+ // options: {
+ // publicPath: './',
+ // },
+ // },
+ // {
+ // loader: 'css-loader',
+ // options: {
+ // sourceMap: true,
+ // },
+ // },
+ // ],
+ // },
// Pipe other styles through css modules and append to style.css
- {
- test: /^((?!\.global).)*\.css$/,
- use: [
- {
- loader: MiniCssExtractPlugin.loader,
- },
- {
- loader: 'css-loader',
- options: {
- modules: {
- localIdentName: '[name]__[local]__[hash:base64:5]',
- },
- sourceMap: true,
- },
- },
- ],
- },
+ // {
+ // test: /^((?!\.global).)*\.css$/,
+ // use: [
+ // {
+ // loader: MiniCssExtractPlugin.loader,
+ // },
+ // {
+ // loader: 'css-loader',
+ // options: {
+ // modules: {
+ // localIdentName: '[name]__[local]__[hash:base64:5]',
+ // },
+ // sourceMap: true,
+ // },
+ // },
+ // ],
+ // },
// WOFF Font
{
test: /\.(woff|woff2|eot|ttf|otf)$/i,
@@ -91,7 +83,6 @@ const configuration: webpack.Configuration = {
type: 'asset/resource',
},
{
- // https://github.com/microsoft/PowerBI-visuals-tools/issues/365#issuecomment-1099716186
test: /\.m?js/,
resolve: {
fullySpecified: false,
@@ -126,22 +117,10 @@ const configuration: webpack.Configuration = {
},
plugins: [
- //new NodePolyfillPlugin(),
-
new MiniCssExtractPlugin({
filename: 'style.css',
}),
- /* new webpack.NormalModuleReplacementPlugin(
- /(.*)_PLATFORMIO_(\.*)/,
- resource => {
- resource.request = resource.request.replace(
- /_PLATFORMIO_/,
- `${targetPlatform}`
- );
- }
- ), */
-
new HtmlWebpackPlugin({
filename: path.join('index.html'),
template: path.join(webpackPaths.srcRendererPath, 'index.ejs'),
@@ -158,15 +137,6 @@ const configuration: webpack.Configuration = {
isDevelopment: process.env.NODE_ENV !== 'production',
nodeModules: webpackPaths.appNodeModulesPath,
}),
- /* new webpack.NormalModuleReplacementPlugin(
- /(.*)_PDFDISTLIB_(\.*)/,
- resource => {
- resource.request = resource.request.replace(
- /_PDFDISTLIB_/,
- `pdfjs-dist`
- );
- }
- ), */
new BundleAnalyzerPlugin({
analyzerMode:
diff --git a/.erb/configs/webpack.config.cordova.prod.ts b/.erb/configs/webpack.config.cordova.prod.ts
index aacbbb23a..b99f00f78 100644
--- a/.erb/configs/webpack.config.cordova.prod.ts
+++ b/.erb/configs/webpack.config.cordova.prod.ts
@@ -1,5 +1,5 @@
/**
- * Build config for electron renderer process
+ * Build config for cordova production
*/
import CssMinimizerPlugin from 'css-minimizer-webpack-plugin';
@@ -9,25 +9,17 @@ import path from 'path';
import webpack from 'webpack';
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
import merge from 'webpack-merge';
-//import NodePolyfillPlugin from 'node-polyfill-webpack-plugin';
+import deleteSourceMaps from '../scripts/delete-source-maps';
import baseConfig from './webpack.config.base';
import webpackPaths from './webpack.paths';
-// import CheckNodeEnv from '../internals/scripts/CheckNodeEnv';
-import deleteSourceMaps from '../scripts/delete-source-maps';
deleteSourceMaps();
-// CheckNodeEnv('production');
const configuration: webpack.Configuration = {
devtool: 'source-map',
-
mode: 'production',
-
target: 'web',
-
- //entry: path.join(__dirname, '..', 'app/index'),
entry: path.join(webpackPaths.srcRendererPath, 'index.tsx'),
- // entry: ['babel-polyfill', './app/index'],
output: {
libraryTarget: 'window', // 'window', // 'commonjs2',
@@ -36,49 +28,49 @@ const configuration: webpack.Configuration = {
filename: 'bundle.js',
},
- /*node: {
- fs: 'empty',
- child_process: 'empty'
- },*/
-
module: {
rules: [
- // Extract all .global.css to style.css as is
{
- test: /\.global\.css$/,
- use: [
- {
- loader: MiniCssExtractPlugin.loader,
- options: {
- publicPath: './',
- },
- },
- {
- loader: 'css-loader',
- options: {
- sourceMap: true,
- },
- },
- ],
+ test: /\.css$/,
+ use: [MiniCssExtractPlugin.loader, 'css-loader'],
+ exclude: /\.module\.s?(c|a)ss$/,
},
+ // Extract all .global.css to style.css as is
+ // {
+ // test: /\.global\.css$/,
+ // use: [
+ // {
+ // loader: MiniCssExtractPlugin.loader,
+ // options: {
+ // publicPath: './',
+ // },
+ // },
+ // {
+ // loader: 'css-loader',
+ // options: {
+ // sourceMap: true,
+ // },
+ // },
+ // ],
+ // },
// Pipe other styles through css modules and append to style.css
- {
- test: /^((?!\.global).)*\.css$/,
- use: [
- {
- loader: MiniCssExtractPlugin.loader,
- },
- {
- loader: 'css-loader',
- options: {
- modules: {
- localIdentName: '[name]__[local]__[hash:base64:5]',
- },
- sourceMap: true,
- },
- },
- ],
- },
+ // {
+ // test: /^((?!\.global).)*\.css$/,
+ // use: [
+ // {
+ // loader: MiniCssExtractPlugin.loader,
+ // },
+ // {
+ // loader: 'css-loader',
+ // options: {
+ // modules: {
+ // localIdentName: '[name]__[local]__[hash:base64:5]',
+ // },
+ // sourceMap: true,
+ // },
+ // },
+ // ],
+ // },
// WOFF Font
{
test: /\.(woff|woff2|eot|ttf|otf)$/i,
@@ -93,7 +85,6 @@ const configuration: webpack.Configuration = {
type: 'asset/resource',
},
{
- // https://github.com/microsoft/PowerBI-visuals-tools/issues/365#issuecomment-1099716186
test: /\.m?js/,
resolve: {
fullySpecified: false,
@@ -134,34 +125,14 @@ const configuration: webpack.Configuration = {
// For webpack@5 you can use the `...` syntax to extend existing minimizers (i.e. `terser-webpack-plugin`), uncomment the next line
`...`,
new CssMinimizerPlugin(),
- /*new OptimizeCSSAssetsPlugin({
- cssProcessorOptions: {
- map: {
- inline: false,
- annotation: true
- }
- }
- })*/
],
},
plugins: [
- //new NodePolyfillPlugin(),
-
new MiniCssExtractPlugin({
filename: 'style.css',
}),
- /* new webpack.NormalModuleReplacementPlugin(
- /(.*)_PLATFORMIO_(\.*)/,
- resource => {
- resource.request = resource.request.replace(
- /_PLATFORMIO_/,
- `${targetPlatform}`
- );
- }
- ), */
-
new HtmlWebpackPlugin({
filename: path.join('index.html'),
template: path.join(webpackPaths.srcRendererPath, 'index.ejs'),
@@ -178,15 +149,6 @@ const configuration: webpack.Configuration = {
isDevelopment: process.env.NODE_ENV !== 'production',
nodeModules: webpackPaths.appNodeModulesPath,
}),
- /* new webpack.NormalModuleReplacementPlugin(
- /(.*)_PDFDISTLIB_(\.*)/,
- resource => {
- resource.request = resource.request.replace(
- /_PDFDISTLIB_/,
- `pdfjs-dist`
- );
- }
- ), */
new BundleAnalyzerPlugin({
analyzerMode:
diff --git a/.erb/configs/webpack.config.renderer.dev.ts b/.erb/configs/webpack.config.renderer.dev.ts
index 5e4613db8..c2aa8ae60 100644
--- a/.erb/configs/webpack.config.renderer.dev.ts
+++ b/.erb/configs/webpack.config.renderer.dev.ts
@@ -71,24 +71,8 @@ const configuration: webpack.Configuration = {
module: {
rules: [
{
- test: /\.s?(c|a)ss$/,
- use: [
- 'style-loader',
- {
- loader: 'css-loader',
- options: {
- modules: true,
- sourceMap: true,
- importLoaders: 1,
- },
- },
- 'sass-loader',
- ],
- include: /\.module\.s?(c|a)ss$/,
- },
- {
- test: /\.s?css$/,
- use: ['style-loader', 'css-loader', 'sass-loader'],
+ test: /\.css$/,
+ use: ['style-loader', 'css-loader'],
exclude: /\.module\.s?(c|a)ss$/,
},
// Fonts
@@ -218,7 +202,7 @@ const configuration: webpack.Configuration = {
},
historyApiFallback: {
verbose: true,
- disableDotRule: false,
+ // disableDotRule: false,
},
setupMiddlewares(middlewares) {
console.log('Starting preload.js builder...');
diff --git a/.erb/configs/webpack.config.renderer.prod.ts b/.erb/configs/webpack.config.renderer.prod.ts
index 4df0df915..7f3c9145a 100644
--- a/.erb/configs/webpack.config.renderer.prod.ts
+++ b/.erb/configs/webpack.config.renderer.prod.ts
@@ -20,11 +20,8 @@ deleteSourceMaps();
const configuration: webpack.Configuration = {
devtool: 'source-map',
-
mode: 'production',
-
target: ['web', 'electron-renderer'],
-
entry: [path.join(webpackPaths.srcRendererPath, 'index.tsx')],
output: {
@@ -39,24 +36,8 @@ const configuration: webpack.Configuration = {
module: {
rules: [
{
- test: /\.s?(a|c)ss$/,
- use: [
- MiniCssExtractPlugin.loader,
- {
- loader: 'css-loader',
- options: {
- modules: true,
- sourceMap: true,
- importLoaders: 1,
- },
- },
- 'sass-loader',
- ],
- include: /\.module\.s?(c|a)ss$/,
- },
- {
- test: /\.s?(a|c)ss$/,
- use: [MiniCssExtractPlugin.loader, 'css-loader', 'sass-loader'],
+ test: /\.css$/,
+ use: [MiniCssExtractPlugin.loader, 'css-loader'],
exclude: /\.module\.s?(c|a)ss$/,
},
// Fonts
diff --git a/.erb/configs/webpack.config.web.dev.ts b/.erb/configs/webpack.config.web.dev.ts
index 4e35c7beb..1012a0781 100644
--- a/.erb/configs/webpack.config.web.dev.ts
+++ b/.erb/configs/webpack.config.web.dev.ts
@@ -1,33 +1,22 @@
/**
- * Build config for electron renderer process
+ * Build config for development build for dev
*/
import HtmlWebpackPlugin from 'html-webpack-plugin';
import MiniCssExtractPlugin from 'mini-css-extract-plugin';
import path from 'path';
import webpack from 'webpack';
-// import OptimizeCSSAssetsPlugin from 'optimize-css-assets-webpack-plugin';
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
import merge from 'webpack-merge';
-//import NodePolyfillPlugin from 'node-polyfill-webpack-plugin';
import baseConfig from './webpack.config.base';
import webpackPaths from './webpack.paths';
-// import CheckNodeEnv from '../internals/scripts/CheckNodeEnv';
-const targetPlatform = 'webdav-io'; // electron-io | webdav-io | cordova-io | process.env.APP_TARGET ||
-
-// CheckNodeEnv('production');
const configuration: webpack.Configuration = {
cache: false,
devtool: 'inline-source-map',
-
mode: 'development',
-
target: 'web',
-
- //entry: path.join(__dirname, '..', 'app/index'),
entry: path.join(webpackPaths.srcRendererPath, 'index.tsx'),
- // entry: ['babel-polyfill', './app/index'],
output: {
libraryTarget: 'window', // 'window', // 'commonjs2',
@@ -36,48 +25,12 @@ const configuration: webpack.Configuration = {
filename: 'bundle.js',
},
- /*node: {
- fs: 'empty',
- child_process: 'empty'
- },*/
-
module: {
rules: [
- // Extract all .global.css to style.css as is
- {
- test: /\.global\.css$/,
- use: [
- {
- loader: MiniCssExtractPlugin.loader,
- options: {
- publicPath: './',
- },
- },
- {
- loader: 'css-loader',
- options: {
- sourceMap: true,
- },
- },
- ],
- },
- // Pipe other styles through css modules and append to style.css
{
- test: /^((?!\.global).)*\.css$/,
- use: [
- {
- loader: MiniCssExtractPlugin.loader,
- },
- {
- loader: 'css-loader',
- options: {
- modules: {
- localIdentName: '[name]__[local]__[hash:base64:5]',
- },
- sourceMap: true,
- },
- },
- ],
+ test: /\.css$/,
+ use: ['style-loader', 'css-loader'],
+ exclude: /\.module\.s?(c|a)ss$/,
},
// WOFF Font
{
@@ -87,26 +40,12 @@ const configuration: webpack.Configuration = {
filename: 'fonts/[hash][ext][query]',
},
},
- // SVG Font
- /*{
- test: /\.svg(\?v=\d+\.\d+\.\d+)?$/,
- use: {
- loader: 'url-loader',
- options: {
- limit: 10000,
- mimetype: 'image/svg+xml',
- },
- },
- type: 'javascript/auto',
- },*/
-
// Common Image Formats
{
test: /\.(?:ico|gif|png|jpg|jpeg|webp|avif)$/,
type: 'asset/resource',
},
{
- // https://github.com/microsoft/PowerBI-visuals-tools/issues/365#issuecomment-1099716186
test: /\.m?js/,
resolve: {
fullySpecified: false,
@@ -141,22 +80,10 @@ const configuration: webpack.Configuration = {
},
plugins: [
- //new NodePolyfillPlugin(),
-
new MiniCssExtractPlugin({
filename: 'style.css',
}),
- /* new webpack.NormalModuleReplacementPlugin(
- /(.*)_PLATFORMIO_(\.*)/,
- resource => {
- resource.request = resource.request.replace(
- /_PLATFORMIO_/,
- `${targetPlatform}`
- );
- }
- ), */
-
new HtmlWebpackPlugin({
filename: path.join('index.html'),
template: path.join(webpackPaths.srcRendererPath, '../../web/index.html'),
@@ -170,15 +97,6 @@ const configuration: webpack.Configuration = {
isDevelopment: process.env.NODE_ENV !== 'production',
nodeModules: webpackPaths.appNodeModulesPath,
}),
- /* new webpack.NormalModuleReplacementPlugin(
- /(.*)_PDFDISTLIB_(\.*)/,
- resource => {
- resource.request = resource.request.replace(
- /_PDFDISTLIB_/,
- `pdfjs-dist`
- );
- }
- ), */
new BundleAnalyzerPlugin({
analyzerMode:
diff --git a/.erb/configs/webpack.config.web.prod.ts b/.erb/configs/webpack.config.web.prod.ts
index 9a230726b..45b47b6fc 100644
--- a/.erb/configs/webpack.config.web.prod.ts
+++ b/.erb/configs/webpack.config.web.prod.ts
@@ -1,5 +1,5 @@
/**
- * Build config for electron renderer process
+ * Build config for web production build
*/
import CssMinimizerPlugin from 'css-minimizer-webpack-plugin';
@@ -9,24 +9,14 @@ import path from 'path';
import webpack from 'webpack';
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
import merge from 'webpack-merge';
-//import NodePolyfillPlugin from 'node-polyfill-webpack-plugin';
import baseConfig from './webpack.config.base';
import webpackPaths from './webpack.paths';
-// import CheckNodeEnv from '../internals/scripts/CheckNodeEnv';
-const targetPlatform = 'webdav-io'; // electron-io | webdav-io | cordova-io | process.env.APP_TARGET ||
-
-// CheckNodeEnv('production');
const configuration: webpack.Configuration = {
devtool: 'source-map',
-
mode: 'production',
-
target: 'web',
-
- //entry: path.join(__dirname, '..', 'app/index'),
entry: path.join(webpackPaths.srcRendererPath, 'index.tsx'),
- // entry: ['babel-polyfill', './app/index'],
output: {
libraryTarget: 'window', // 'window', // 'commonjs2',
@@ -35,50 +25,50 @@ const configuration: webpack.Configuration = {
filename: 'bundle.js',
},
- /*node: {
- fs: 'empty',
- child_process: 'empty'
- },*/
-
module: {
rules: [
- // Extract all .global.css to style.css as is
{
- test: /\.global\.css$/,
- use: [
- {
- loader: MiniCssExtractPlugin.loader,
- options: {
- publicPath: './',
- },
- },
- {
- loader: 'css-loader',
- options: {
- sourceMap: true,
- },
- },
- ],
+ test: /\.css$/,
+ use: [MiniCssExtractPlugin.loader, 'css-loader'],
+ exclude: /\.module\.s?(c|a)ss$/,
},
+ // Extract all .global.css to style.css as is
+ // {
+ // test: /\.global\.css$/,
+ // use: [
+ // {
+ // loader: MiniCssExtractPlugin.loader,
+ // options: {
+ // publicPath: './',
+ // },
+ // },
+ // {
+ // loader: 'css-loader',
+ // options: {
+ // sourceMap: true,
+ // },
+ // },
+ // ],
+ // },
// Pipe other styles through css modules and append to style.css
- {
- test: /^((?!\.global).)*\.css$/,
- use: [
- {
- loader: MiniCssExtractPlugin.loader,
- },
- {
- loader: 'css-loader',
- options: {
- modules: {
- localIdentName: '[name]__[local]__[hash:base64:5]',
- },
- sourceMap: true,
- },
- },
- ],
- },
- // WOFF Font
+ // {
+ // test: /^((?!\.global).)*\.css$/,
+ // use: [
+ // {
+ // loader: MiniCssExtractPlugin.loader,
+ // },
+ // {
+ // loader: 'css-loader',
+ // options: {
+ // modules: {
+ // localIdentName: '[name]__[local]__[hash:base64:5]',
+ // },
+ // sourceMap: true,
+ // },
+ // },
+ // ],
+ // },
+ // Fonts
{
test: /\.(woff|woff2|eot|ttf|otf)$/i,
type: 'asset/resource',
@@ -86,67 +76,12 @@ const configuration: webpack.Configuration = {
filename: 'fonts/[hash][ext][query]',
},
},
- /*{
- test: /\.woff(\?v=\d+\.\d+\.\d+)?$/,
- use: {
- loader: 'url-loader',
- options: {
- limit: 10000,
- mimetype: 'application/font-woff'
- }
- },
- type: 'javascript/auto'
- },
- // WOFF2 Font
- {
- test: /\.woff2(\?v=\d+\.\d+\.\d+)?$/,
- use: {
- loader: 'url-loader',
- options: {
- limit: 10000,
- mimetype: 'application/font-woff'
- }
- },
- type: 'javascript/auto'
- },
- // TTF Font
- {
- test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/,
- use: {
- loader: 'url-loader',
- options: {
- limit: 10000,
- mimetype: 'application/octet-stream'
- }
- },
- type: 'javascript/auto'
- },
- // EOT Font
- {
- test: /\.eot(\?v=\d+\.\d+\.\d+)?$/,
- use: 'file-loader',
- type: 'javascript/auto'
- },*/
- // SVG Font
- /*{
- test: /\.svg(\?v=\d+\.\d+\.\d+)?$/,
- use: {
- loader: 'url-loader',
- options: {
- limit: 10000,
- mimetype: 'image/svg+xml',
- },
- },
- type: 'javascript/auto',
- },*/
-
// Common Image Formats
{
test: /\.(?:ico|gif|png|jpg|jpeg|webp|avif)$/,
type: 'asset/resource',
},
{
- // https://github.com/microsoft/PowerBI-visuals-tools/issues/365#issuecomment-1099716186
test: /\.m?js/,
resolve: {
fullySpecified: false,
@@ -199,22 +134,10 @@ const configuration: webpack.Configuration = {
},
plugins: [
- //new NodePolyfillPlugin(),
-
new MiniCssExtractPlugin({
filename: 'style.css',
}),
- /* new webpack.NormalModuleReplacementPlugin(
- /(.*)_PLATFORMIO_(\.*)/,
- resource => {
- resource.request = resource.request.replace(
- /_PLATFORMIO_/,
- `${targetPlatform}`
- );
- }
- ), */
-
new HtmlWebpackPlugin({
filename: path.join('index.html'),
template: path.join(webpackPaths.srcRendererPath, '../../web/index.html'),
@@ -228,15 +151,6 @@ const configuration: webpack.Configuration = {
isDevelopment: process.env.NODE_ENV !== 'production',
nodeModules: webpackPaths.appNodeModulesPath,
}),
- /* new webpack.NormalModuleReplacementPlugin(
- /(.*)_PDFDISTLIB_(\.*)/,
- resource => {
- resource.request = resource.request.replace(
- /_PDFDISTLIB_/,
- `pdfjs-dist`
- );
- }
- ), */
new BundleAnalyzerPlugin({
analyzerMode:
diff --git a/package-lock.json b/package-lock.json
index 56644e79c..61e5ee2c4 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -157,8 +157,6 @@
"redux-logger": "3.0.6",
"rimraf": "5.0.10",
"s3rver": "3.7.1",
- "sass": "^1.67.0",
- "sass-loader": "^13.3.2",
"serve-static": "^1.14.1",
"shelljs": "0.10.0",
"shx": "0.4.0",
@@ -16035,78 +16033,6 @@
"url": "https://github.com/sponsors/ocavue"
}
},
- "node_modules/@parcel/watcher": {
- "version": "2.5.1",
- "dev": true,
- "hasInstallScript": true,
- "license": "MIT",
- "optional": true,
- "dependencies": {
- "detect-libc": "^1.0.3",
- "is-glob": "^4.0.3",
- "micromatch": "^4.0.5",
- "node-addon-api": "^7.0.0"
- },
- "engines": {
- "node": ">= 10.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/parcel"
- },
- "optionalDependencies": {
- "@parcel/watcher-android-arm64": "2.5.1",
- "@parcel/watcher-darwin-arm64": "2.5.1",
- "@parcel/watcher-darwin-x64": "2.5.1",
- "@parcel/watcher-freebsd-x64": "2.5.1",
- "@parcel/watcher-linux-arm-glibc": "2.5.1",
- "@parcel/watcher-linux-arm-musl": "2.5.1",
- "@parcel/watcher-linux-arm64-glibc": "2.5.1",
- "@parcel/watcher-linux-arm64-musl": "2.5.1",
- "@parcel/watcher-linux-x64-glibc": "2.5.1",
- "@parcel/watcher-linux-x64-musl": "2.5.1",
- "@parcel/watcher-win32-arm64": "2.5.1",
- "@parcel/watcher-win32-ia32": "2.5.1",
- "@parcel/watcher-win32-x64": "2.5.1"
- }
- },
- "node_modules/@parcel/watcher-darwin-arm64": {
- "version": "2.5.1",
- "cpu": [
- "arm64"
- ],
- "dev": true,
- "license": "MIT",
- "optional": true,
- "os": [
- "darwin"
- ],
- "engines": {
- "node": ">= 10.0.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/parcel"
- }
- },
- "node_modules/@parcel/watcher/node_modules/detect-libc": {
- "version": "1.0.3",
- "dev": true,
- "license": "Apache-2.0",
- "optional": true,
- "bin": {
- "detect-libc": "bin/detect-libc.js"
- },
- "engines": {
- "node": ">=0.10"
- }
- },
- "node_modules/@parcel/watcher/node_modules/node-addon-api": {
- "version": "7.1.1",
- "dev": true,
- "license": "MIT",
- "optional": true
- },
"node_modules/@pkgjs/parseargs": {
"version": "0.11.0",
"dev": true,
@@ -20745,20 +20671,6 @@
"url": "https://github.com/sponsors/wooorm"
}
},
- "node_modules/chokidar": {
- "version": "4.0.3",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "readdirp": "^4.0.1"
- },
- "engines": {
- "node": ">= 14.16.0"
- },
- "funding": {
- "url": "https://paulmillr.com/funding/"
- }
- },
"node_modules/chownr": {
"version": "2.0.0",
"dev": true,
@@ -26884,11 +26796,6 @@
"url": "https://opencollective.com/immer"
}
},
- "node_modules/immutable": {
- "version": "5.1.3",
- "dev": true,
- "license": "MIT"
- },
"node_modules/import-fresh": {
"version": "3.3.1",
"devOptional": true,
@@ -34469,18 +34376,6 @@
"node": ">= 6"
}
},
- "node_modules/readdirp": {
- "version": "4.1.2",
- "dev": true,
- "license": "MIT",
- "engines": {
- "node": ">= 14.18.0"
- },
- "funding": {
- "type": "individual",
- "url": "https://paulmillr.com/funding/"
- }
- },
"node_modules/rechoir": {
"version": "0.6.2",
"resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz",
@@ -35279,61 +35174,6 @@
"truncate-utf8-bytes": "^1.0.0"
}
},
- "node_modules/sass": {
- "version": "1.89.2",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "chokidar": "^4.0.0",
- "immutable": "^5.0.2",
- "source-map-js": ">=0.6.2 <2.0.0"
- },
- "bin": {
- "sass": "sass.js"
- },
- "engines": {
- "node": ">=14.0.0"
- },
- "optionalDependencies": {
- "@parcel/watcher": "^2.4.1"
- }
- },
- "node_modules/sass-loader": {
- "version": "13.3.3",
- "dev": true,
- "license": "MIT",
- "dependencies": {
- "neo-async": "^2.6.2"
- },
- "engines": {
- "node": ">= 14.15.0"
- },
- "funding": {
- "type": "opencollective",
- "url": "https://opencollective.com/webpack"
- },
- "peerDependencies": {
- "fibers": ">= 3.1.0",
- "node-sass": "^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0",
- "sass": "^1.3.0",
- "sass-embedded": "*",
- "webpack": "^5.0.0"
- },
- "peerDependenciesMeta": {
- "fibers": {
- "optional": true
- },
- "node-sass": {
- "optional": true
- },
- "sass": {
- "optional": true
- },
- "sass-embedded": {
- "optional": true
- }
- }
- },
"node_modules/sax": {
"version": "1.4.1",
"dev": true,
diff --git a/package.json b/package.json
index d872bf906..31eb15b88 100644
--- a/package.json
+++ b/package.json
@@ -317,8 +317,6 @@
"redux-logger": "3.0.6",
"rimraf": "5.0.10",
"s3rver": "3.7.1",
- "sass": "^1.67.0",
- "sass-loader": "^13.3.2",
"serve-static": "^1.14.1",
"shelljs": "0.10.0",
"shx": "0.4.0",
diff --git a/scripts/checkWSinstalled.js b/scripts/checkWSinstalled.js
index 226ea7ee6..8bf15396f 100644
--- a/scripts/checkWSinstalled.js
+++ b/scripts/checkWSinstalled.js
@@ -2,7 +2,6 @@
const path = require('path');
const fs = require('fs-extra');
-// const shell = require('shelljs');
const childProcess = require('child_process');
const packageJson = require('../release/app/package.json');
@@ -14,19 +13,10 @@ function isInstalled(packageName, checkVersion = undefined) {
.execSync(
'npm list --depth=0 --prefix ' + path.join(__dirname, '../release/app'),
)
- //.execSync('npm view ' + packageName + ' version')
.toString();
if (versions.indexOf(packageVersions) > 0) {
return true;
}
- /*if (checkVersion) {
- if (checkVersion === version) {
- return true;
- }
- } else if (version.length > 0) {
- return true;
- }*/
- // require.resolve('../app/node_modules/' + packageName);
return false;
} catch (err) {
return false;
@@ -45,22 +35,6 @@ function dirExist(dir) {
return false;
}
-/*function checkSharpPlatform(targetPlatform, arch) {
- if (!targetPlatform || !arch) {
- return true;
- }
- try {
- const sharp = require('../app/node_modules/sharp');
- const vendor = sharp.vendor;
- console.log('vendor: ' + vendor);
-
- return vendor.current === targetPlatform + '-' + arch;
- } catch (e) {
- console.log('checkSharpPlatform: ', e);
- return false;
- }
-}*/
-
let platform = 'node';
let installCmd;
const dir = path.join(__dirname, '../release/app/node_modules');
@@ -99,10 +73,4 @@ if (platform === 'node') {
}
if (installCmd) {
console.log(childProcess.execSync(installCmd).toString());
- /*if (shell.exec(installCmd).code !== 0) {
- shell.echo(
- 'Error: Install ' + process.env.PD_PLATFORM + ' platform failed'
- );
- shell.exit(1);
- }*/
}