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

Commit

Permalink
Move to yarn 3; Add missing peer deps (#69)
Browse files Browse the repository at this point in the history
* Update yarn to v3
* Remove unused code
* Simplify tsup setup
* Add missing peerDeps

Co-authored-by: Norbert de Langen <ndelangen@me.com>
  • Loading branch information
Shaun Evening and ndelangen committed Jul 13, 2023
1 parent 7946382 commit 7e6e008
Show file tree
Hide file tree
Showing 11 changed files with 13,863 additions and 8,952 deletions.
23 changes: 0 additions & 23 deletions .babelrc.js

This file was deleted.

9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,11 @@ node_modules/
storybook-static/
build-storybook.log
.DS_Store
.env
.env

.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
2 changes: 1 addition & 1 deletion .storybook/local-preset.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ export const previewAnnotations = [require.resolve("../dist/preview.mjs")];

export const managerEntries = [require.resolve("../dist/manager.mjs")];

export * from "../dist/preset.mjs";
export * from "../dist/preset.js";
874 changes: 874 additions & 0 deletions .yarn/releases/yarn-3.6.1.cjs

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-3.6.1.cjs
57 changes: 33 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,11 @@
"type": "git",
"url": "https://github.com/storybookjs/addon-styling"
},
"license": "MIT",
"author": {
"name": "Shaun Evening",
"email": "goodeveningshaun@gmail.com"
},
"license": "MIT",
"bin": {
"addon-styling-setup": "./postinstall.js"
},
"exports": {
".": {
"require": "./dist/index.js",
Expand Down Expand Up @@ -48,6 +45,9 @@
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"bin": {
"addon-styling-setup": "./postinstall.js"
},
"files": [
"bin/**/*",
"dist/**/*",
Expand All @@ -56,19 +56,18 @@
"*.d.ts"
],
"scripts": {
"clean": "rimraf ./dist",
"prebuild": "yarn clean",
"build:addon": "tsup --config=\"./tsup.browser.config.js\"",
"build:config": "tsup --config=\"./tsup.node.config.js\"",
"build:watch": "yarn build:addon --watch",
"build:all": "concurrently \"yarn build:addon\" \"yarn build:config\"",
"test": "vitest",
"test:coverage": "vitest run --coverage",
"storybook": "storybook dev -p 6006",
"start": "concurrently \"yarn build:watch\" \"yarn storybook -- --quiet\"",
"build": "tsup",
"build-storybook": "storybook build",
"build:watch": "yarn build --watch",
"prerelease": "zx scripts/prepublish-checks.mjs",
"release": "yarn build:all && auto shipit"
"release": "yarn build && auto shipit",
"start": "concurrently \"yarn build:watch\" \"yarn storybook -- --quiet\"",
"storybook": "storybook dev -p 6006",
"test": "vitest",
"test:coverage": "vitest run --coverage"
},
"resolutions": {
"recast": "^0.23.2"
},
"dependencies": {
"@babel/template": "^7.20.7",
Expand All @@ -85,29 +84,28 @@
"css-loader": "^6.7.3",
"less-loader": "^11.1.0",
"postcss-loader": "^7.2.4",
"prettier": "^2.8.0",
"resolve-url-loader": "^5.0.0",
"sass-loader": "^13.2.2",
"style-loader": "^3.3.2"
},
"devDependencies": {
"@babel/cli": "^7.12.1",
"@babel/core": "^7.12.3",
"@babel/preset-env": "^7.12.1",
"@babel/preset-react": "^7.12.5",
"@babel/preset-typescript": "^7.13.0",
"@storybook/addon-essentials": "^7.0.12",
"@storybook/builder-webpack5": "^7.0.12",
"@storybook/csf-tools": "^7.0.12",
"@storybook/react": "^7.0.12",
"@storybook/react-vite": "^7.0.12",
"@storybook/types": "^7.0.12",
"@types/node": "^16.0.0",
"@vitejs/plugin-react": "^3.1.0",
"auto": "^10.3.0",
"babel-loader": "^8.1.0",
"boxen": "^5.0.1",
"concurrently": "^6.2.0",
"dedent": "^0.7.0",
"prettier": "^2.8.8",
"less": "^4.0.0",
"postcss": "^8.0.1",
"prop-types": "^15.7.2",
"react": "^17.0.1",
"react-dom": "^17.0.1",
Expand All @@ -118,23 +116,34 @@
"typescript": "^4.9.0",
"vite": "^4.2.1",
"vitest": "^0.31.0",
"webpack": "^5.0.0",
"zx": "^1.14.1"
},
"peerDependencies": {
"less": "^3.5.0 || ^4.0.0",
"postcss": "^7.0.0 || ^8.0.1",
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0",
"webpack": "^5.0.0"
},
"peerDependenciesMeta": {
"less": {
"optional": true
},
"postcss": {
"optional": true
},
"react": {
"optional": true
},
"react-dom": {
"optional": true
},
"webpack": {
"optional": true
}
},
"resolutions": {
"recast": "^0.23.2"
},
"packageManager": "yarn@3.6.1",
"publishConfig": {
"access": "public"
},
Expand Down
Empty file modified postinstall.js
100644 → 100755
Empty file.
18 changes: 0 additions & 18 deletions tsup.browser.config.js

This file was deleted.

39 changes: 39 additions & 0 deletions tsup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import { defineConfig } from "tsup";

export default defineConfig((options) => [
{
entry: [
"src/index.ts",
"src/preview.ts",
"src/manager.ts",
"src/preset.ts",
],
splitting: false,
minify: !options.watch,
format: ["cjs", "esm"],
dts: {
resolve: true,
},
treeshake: true,
sourcemap: true,
clean: true,
platform: "browser",
esbuildOptions(options) {
options.conditions = ["module"];
},
},
{
entry: ["src/postinstall.ts"],
outDir: "./bin",
splitting: false,
minify: !options.watch,
format: ["cjs"],
treeshake: true,
target: "node16",
clean: true,
platform: "node",
esbuildOptions(options) {
options.conditions = ["module"];
},
},
]);
15 changes: 0 additions & 15 deletions tsup.node.config.js

This file was deleted.

Loading

0 comments on commit 7e6e008

Please sign in to comment.