Skip to content
This repository has been archived by the owner on Jan 2, 2024. It is now read-only.

Commit

Permalink
Chore: Update application dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
DHedgecock committed Aug 6, 2022
1 parent ce5b501 commit 3b907f4
Show file tree
Hide file tree
Showing 45 changed files with 42,776 additions and 33,585 deletions.
10 changes: 10 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict'

module.exports = {
ignorePatterns: ['componentry.config.js', 'src/utils/setup-tracer.ts'],
extends: 'eloquence/react',
rules: {
// Enforce that testing library is used through utils/testing-library only
Expand All @@ -15,5 +16,14 @@ module.exports = {
project: ['tsconfig.json', 'cypress/tsconfig.json'],
},
},
{
files: ['src/theme/**/*.js'],
parserOptions: {
sourceType: 'script',
},
env: {
node: true,
},
},
],
}
21 changes: 1 addition & 20 deletions .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ const path = require('path')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const SVGSymbolSprite = require('svg-symbol-sprite-loader')

const { themeAccessor } = require('../webpack/theme-accessor')

const context = fs.realpathSync(process.cwd())

module.exports = {
Expand Down Expand Up @@ -41,29 +39,12 @@ module.exports = {
MiniCssExtractPlugin.loader,
{
loader: 'css-loader',
options: {
sourceMap: isProduction,
modules: {
mode: 'global',
localIdentName: '[name]-[local]--[hash:5]',
},
},
options: { sourceMap: isProduction },
},
{
loader: 'postcss-loader',
options: { sourceMap: isProduction },
},
{
loader: 'sass-loader',
options: {
sourceMap: isProduction,
sassOptions: {
functions: {
'theme($theme-path: null)': themeAccessor,
},
},
},
},
],
},
// --- 📦 SVG icon sprite loader
Expand Down
10 changes: 5 additions & 5 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Theme } from 'componentry'
import { ComponentryProvider } from 'componentry'
import svgSymbolSpriteLoader from 'svg-symbol-sprite-loader'

import { componentryTheme } from '@/theme/componentry'
import { theme } from '@/theme/theme'

// Include app base styles
import '../src/index.scss'
import '../src/index.css'

// Import app icon sprite
import '../src/utils/require-icons'
Expand All @@ -20,9 +20,9 @@ svgSymbolSpriteLoader({
export const decorators = [
// Global decorator sets Componentry prop defaults
(Story) => (
<Theme theme={componentryTheme}>
<ComponentryProvider theme={theme}>
<Story />
</Theme>
</ComponentryProvider>
),
]

Expand Down
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ module.exports = function babelConfigs(api) {
development: {
plugins: [
// Babel transform for "Fast Refresh"
// 'react-refresh/babel',
'react-refresh/babel',
],
},
production: {
Expand Down
12 changes: 12 additions & 0 deletions componentry.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
'use strict'

const { components } = require('./src/theme/components')
const { theme } = require('./src/theme/theme')

// --- Componentry.design application theme
// --------------------------------------------------------

module.exports = {
theme,
components,
}
2 changes: 2 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,7 @@ module.exports = {
'\\.svg$': '<rootDir>/__mocks__/svgr-loader-mock.js',
'\\.css$': '<rootDir>/__mocks__/css-loader-mock.js',
'\\.scss$': '<rootDir>/__mocks__/scss-loader-mock.js',
// Workaround for: https://jestjs.io/docs/upgrading-to-jest28#packagejson-exports
'componentry': '<rootDir>/node_modules/componentry/dist/commonjs/index.js',
},
}

0 comments on commit 3b907f4

Please sign in to comment.