Skip to content

Commit f723f3a

Browse files
author
Shaun Lloyd
committed
Initial commit
0 parents  commit f723f3a

22 files changed

+4754
-0
lines changed

.github/media/styling.svg

+10
Loading

.github/workflows/release.yml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Release
2+
3+
on: [push]
4+
5+
jobs:
6+
release:
7+
runs-on: ubuntu-latest
8+
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
9+
steps:
10+
- uses: actions/checkout@v2
11+
12+
- name: Prepare repository
13+
run: git fetch --unshallow --tags
14+
15+
- name: Use Node.js 16.x
16+
uses: actions/setup-node@v1
17+
with:
18+
node-version: 16.x
19+
20+
- uses: pnpm/action-setup@v2
21+
name: Install pnpm
22+
with:
23+
version: 8
24+
run_install: false
25+
26+
- name: Get pnpm store directory
27+
shell: bash
28+
run: |
29+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
30+
31+
- uses: actions/cache@v3
32+
name: Setup pnpm cache
33+
with:
34+
path: ${{ env.STORE_PATH }}
35+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
36+
restore-keys: |
37+
${{ runner.os }}-pnpm-store-
38+
39+
- name: Install dependencies
40+
run: pnpm install
41+
42+
- name: Create Release
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
46+
run: |
47+
pnpm release

.gitignore

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
bin/
2+
dist/
3+
node_modules/
4+
storybook-static/
5+
build-storybook.log
6+
.DS_Store
7+
.env
8+
9+
.yarn/*
10+
!.yarn/patches
11+
!.yarn/plugins
12+
!.yarn/releases
13+
!.yarn/sdks
14+
!.yarn/versions

.prettierignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dist

.prettierrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

.yarn/releases/yarn-3.6.1.cjs

+874
Large diffs are not rendered by default.

.yarnrc.yml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
nodeLinker: node-modules
2+
3+
yarnPath: .yarn/releases/yarn-3.6.1.cjs

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021 Storybook contributors
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# `@storybook/addon-styling`
2+
3+
Get started in Storybook 7 faster with popular styling tools.
4+
5+
## ✨ Features
6+
7+
- 🤖 Zero-config for popular tools through codemods.
8+
- 🧩 Configuration templates for popular tools
9+
- ⚡️ Options for CSS modules, PostCSS, Sass, Less, and Vanilla-extract
10+
11+
## 🏁 Getting Started
12+
13+
To get started, **install the package** using the Storybook CLI
14+
15+
pnpm:
16+
17+
```zsh
18+
pnpm dlx storybook@latest add @storybook/addon-styling-webpack
19+
```
20+
21+
yarn:
22+
23+
```zsh
24+
yarn dlx storybook@latest add @storybook/addon-styling-webpack
25+
```
26+
27+
npm:
28+
29+
```zsh
30+
npx storybook@latest add @storybook/addon-styling-webpack
31+
```
32+
33+
## 🤝 Contributing
34+
35+
If you'd like to contribute to this addon, **THANK YOU**, I'd love your help 🙏
36+
37+
### 📝 Development scripts
38+
39+
- `pnpm build` build and package your addon code
40+
41+
### 🌲 Branch structure
42+
43+
- **next** - the `next` version on npm, and the development branch where most work occurs
44+
- **main** - the `latest` version on npm and the stable version that most users use
45+
46+
### 🚀 Release process
47+
48+
1. All PRs should target the `next` branch, which depends on the `next` version of Storybook.
49+
2. When merged, a new version of this package will be released on the `next` NPM tag.
50+
3. If the change contains a bugfix that needs to be patched back to the stable version, please note that in PR description.
51+
4. PRs labeled `pick` will get cherry-picked back to the `main` branch and will generate a release on the `latest` npm tag.

auto.config.js

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module.exports = {
2+
baseBranch: "main",
3+
labels: [
4+
{
5+
name: "documentation",
6+
releaseType: "none",
7+
},
8+
],
9+
prereleaseBranches: ["next", "prerelease"],
10+
versionBranches: true,
11+
};

package.json

+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
{
2+
"name": "@storybook/addon-styling-webpack",
3+
"version": "0.0.0",
4+
"description": "A base addon for configuring popular styling tools in Webpack",
5+
"keywords": [
6+
"style",
7+
"design",
8+
"webpack",
9+
"configuration",
10+
"storybook-addons"
11+
],
12+
"repository": {
13+
"type": "git",
14+
"url": "https://github.com/storybookjs/addon-styling-webpack"
15+
},
16+
"license": "MIT",
17+
"author": {
18+
"name": "Shaun Evening",
19+
"email": "[email protected]"
20+
},
21+
"exports": {
22+
".": {
23+
"require": "./dist/index.js",
24+
"import": "./dist/index.mjs",
25+
"types": "./dist/index.d.ts"
26+
},
27+
"./preset": {
28+
"require": "./dist/preset.js",
29+
"import": "./dist/preset.mjs",
30+
"types": "./dist/preset.d.ts"
31+
},
32+
"./package.json": "./package.json",
33+
"./postinstall": "./postinstall.js"
34+
},
35+
"main": "dist/index.js",
36+
"module": "dist/index.mjs",
37+
"types": "dist/index.d.ts",
38+
"files": [
39+
"bin/**/*",
40+
"dist/**/*",
41+
"README.md",
42+
"*.js",
43+
"*.d.ts"
44+
],
45+
"scripts": {
46+
"build": "tsup",
47+
"build:watch": "pnpm build --watch",
48+
"clean": "rimraf dist && rimraf bin",
49+
"release": "pnpm build && auto shipit"
50+
},
51+
"dependencies": {
52+
"@storybook/node-logger": "^7.0.12"
53+
},
54+
"devDependencies": {
55+
"@types/node": "^16.0.0",
56+
"auto": "^10.3.0",
57+
"prettier": "^2.8.0",
58+
"rimraf": "^3.0.2",
59+
"tsup": "^6.7.0",
60+
"typescript": "^4.9.0",
61+
"webpack": "^5.0.0"
62+
},
63+
"peerDependencies": {
64+
"webpack": "^5.0.0"
65+
},
66+
"packageManager": "[email protected]",
67+
"publishConfig": {
68+
"access": "public"
69+
},
70+
"storybook": {
71+
"displayName": "Styling-Webpack",
72+
"supportedFrameworks": [
73+
"react",
74+
"vue",
75+
"web-components",
76+
"html",
77+
"preact"
78+
],
79+
"icon": "https://raw.githubusercontent.com/storybookjs/addon-styling/1e17a71614dde4337f402dd5f00d761991d1a9d8/.github/media/styling.svg"
80+
}
81+
}

0 commit comments

Comments
 (0)