Skip to content

Commit

Permalink
fix(build): Update build dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
jourdain committed Aug 18, 2021
1 parent f1afd51 commit 3977df1
Show file tree
Hide file tree
Showing 13 changed files with 22,223 additions and 19,403 deletions.
14 changes: 14 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,20 @@ module.exports = {
'no-else-return': 0,
'import/no-cycle': 0,
'react/jsx-wrap-multilines': 0,

// when updating to kw-web-suite 11.1.0, we have more lint issues
// and no time to fix
'prefer-object-spread': 0,
'no-redeclare': 0,
'func-names': 0,
'react/no-render-return-value': 0,
'react/jsx-props-no-spreading': 0,
'babel/new-cap': 0,
'react/no-deprecated': 0,
'react/sort-comp': 0,
'jsx-a11y/control-has-associated-label': 0,
'react/jsx-curly-newline': 0,
'no-useless-rename': 0,
},
plugins: [
'prettier'
Expand Down
1 change: 1 addition & 0 deletions config/funcMock.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = () => {}
3 changes: 3 additions & 0 deletions config/prebuild.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
# FROM: https://github.com/JetBrains/svg-sprite-loader/issues/359#issuecomment-738834513
cat ./config/funcMock.js > ./node_modules/svg-sprite-loader/lib/utils/get-matched-rule.js
13 changes: 13 additions & 0 deletions config/wp5/rules-linter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const path = require('path');

const eslintrcPath = path.join(__dirname, '../../.eslintrc.js');

module.exports = [
{
test: /\.js$/,
loader: 'eslint-loader',
exclude: /node_modules/,
enforce: 'pre',
options: { configFile: eslintrcPath },
},
];
89 changes: 89 additions & 0 deletions config/wp5/rules-pvw.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
module.exports = [
{
test: /\.js$/,
exclude: /node_modules/,
use: [
{
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env', '@babel/preset-react'],
},
},
],
},
{
test: /\.c$/i,
exclude: /node_modules/,
loader: 'shader-loader',
},
{
test: /\.mcss$/,
use: [
{ loader: 'style-loader' },
{
loader: 'css-loader',
options: {
modules: {
localIdentName: '[name]-[local]_[sha512:hash:base32:5]',
},
},
},
{
loader: 'postcss-loader',
},
],
},
{
test: /\.html$/,
loader: 'html-loader',
},
{
test: /\.isvg$/,
loader: 'html-loader',
options: {
attrs: false, // ?attrs=false
sources: false, // ^ Replacemet?
}
},
{
test: /\.svg$/,
loader: 'svg-sprite-loader',
exclude: /fonts/,
options: {
runtimeCompat: true,
},
},
{
test: /\.woff(2)?(\?v=[0-9]\.[0-9]\.[0-9])?$/,
loader: 'url-loader',
options: {
limit: 60000,
mimetype: 'application/font-woff',
},
},
{
test: /\.(ttf|eot|svg)(\?v=[0-9]\.[0-9]\.[0-9])?$/,
loader: 'url-loader',
include: /fonts/,
options: {
limit: 60000,
},
},
{
test: /\.(png|jpg)$/,
loader: 'url-loader',
options: {
limit: 8192,
},
},
{
test: /\.css$/,
use: [
{ loader: 'style-loader' },
{ loader: 'css-loader' },
{
loader: 'postcss-loader',
},
],
},
];
32 changes: 32 additions & 0 deletions config/wp5/rules-vtk.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
module.exports = [
{
test: /\.glsl$/i,
include: /node_modules(\/|\\)vtk.js(\/|\\)/,
loader: 'shader-loader',
},
{
test: /\.js$/,
include: /node_modules(\/|\\)vtk.js(\/|\\)/,
use: [
{
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env'],
// presets: [['env', { targets: { browsers: 'last 2 versions' } }]],
},
},
],
},
{
test: /\.worker\.js$/,
include: /node_modules(\/|\\)vtk.js(\/|\\)/,
use: [
{ loader: 'worker-loader', options: { inline: 'no-fallback' } },
],
},
{
test: /\.svg$/,
include: /node_modules(\/|\\)vtk.js(\/|\\)/,
use: [{ loader: 'raw-loader' }],
},
];
15 changes: 15 additions & 0 deletions config/wp5/rules-wslink.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module.exports = [
{
test: /\.js$/,
include: /node_modules(\/|\\)wslink(\/|\\)/,
use: [
{
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env'],
// presets: [['env', { targets: { browsers: 'last 2 versions' } }]],
},
},
],
},
];
9 changes: 5 additions & 4 deletions documentation/config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
const path = require('path');

const linterRules = require('../config/rules-linter.js');
const pvwRules = require('../config/rules-pvw.js');
const vtkRules = require('../config/rules-vtk.js');
const wslinkRules = require('../config/rules-wslink.js');
const linterRules = require('../config/wp5/rules-linter.js');
const pvwRules = require('../config/wp5/rules-pvw.js');
const vtkRules = require('../config/wp5/rules-vtk.js');
const wslinkRules = require('../config/wp5/rules-wslink.js');

module.exports = {
baseUrl: '/paraviewweb',
Expand Down Expand Up @@ -38,6 +38,7 @@ module.exports = {
paraviewweb: path.resolve('.'),
PVWStyle: path.resolve('./style'),
},
fallback: { stream: require.resolve('stream-browserify') },
},
},
copy: [],
Expand Down
File renamed without changes.
Loading

0 comments on commit 3977df1

Please sign in to comment.