Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

Commit

Permalink
package: distribute as cjs-only module
Browse files Browse the repository at this point in the history
  • Loading branch information
arnemolland committed Apr 7, 2022
1 parent e0d0848 commit 32f4b70
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 41 deletions.
24 changes: 24 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
module.exports = {
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:storybook/recommended',
'plugin:mdx/recommended'
],
settings: {
'mdx/code-blocks': true
},
rules: {
'import/first': 'error',
'import/no-duplicates': 'error',
'no-unused-vars': 'error',
'no-console': 'error',
'no-empty': 'error',
'no-nested-ternary': 'error',
'no-useless-escape': 'error',
'no-var': 'error',
complexity: ['error', 6],
eqeqeq: 'error',
quotes: ['error', 'single']
}
}
9 changes: 0 additions & 9 deletions .eslintrc.json

This file was deleted.

4 changes: 1 addition & 3 deletions jest.config.cjs → jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,5 @@ module.exports = {
transform: {
'node_modules/variables/.+\\.(j|t)sx?$': 'ts-jest'
},
testPathIgnorePatterns: [
"dist"
]
testPathIgnorePatterns: ['dist']
}
43 changes: 21 additions & 22 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 5 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
"name": "@gameflow-tv/flume",
"version": "0.0.0-dev",
"description": "React implementation of the Flume design system",
"module": "dist/index.js",
"main": "dist/index.xjs",
"type": "module",
"main": "dist/index.js",
"files": [
"dist",
"bundle.scss"
Expand Down Expand Up @@ -32,7 +30,7 @@
"postbuild": "npm run bundle-styles",
"bundle-styles": "scss-bundle -e src/styles/index.scss -o bundle.scss --rootDir src/styles",
"watch": "tsc && npm run build:bundle -- --watch",
"build:bundle": "tsup src/index.ts --format cjs,esm --dts --clean"
"build:bundle": "tsup src/index.ts --dts --clean"
},
"husky": {
"hooks": {
Expand Down Expand Up @@ -75,10 +73,10 @@
"@types/jest": "^27.4.1",
"@types/jsdom": "^16.2.14",
"@types/node": "17.0.23",
"@types/react": "^17.0.43",
"@types/react-dom": "^17.0.14",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"@types/rollup-plugin-peer-deps-external": "^2.2.1",
"@types/styled-components": "^5.1.24",
"@types/styled-components": "^5.1.25",
"acorn-jsx": "^5.3.2",
"awesome-typescript-loader": "^5.2.1",
"babel-loader": "^8.2.4",
Expand Down

0 comments on commit 32f4b70

Please sign in to comment.