Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaun Lloyd committed Aug 18, 2023
0 parents commit f723f3a
Show file tree
Hide file tree
Showing 22 changed files with 4,754 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/media/styling.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 47 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Release

on: [push]

jobs:
release:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
steps:
- uses: actions/checkout@v2

- name: Prepare repository
run: git fetch --unshallow --tags

- name: Use Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 16.x

- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install

- name: Create Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
pnpm release
14 changes: 14 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
bin/
dist/
node_modules/
storybook-static/
build-storybook.log
.DS_Store
.env

.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dist
1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
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
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 Storybook contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
51 changes: 51 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# `@storybook/addon-styling`

Get started in Storybook 7 faster with popular styling tools.

## ✨ Features

- 🤖 Zero-config for popular tools through codemods.
- 🧩 Configuration templates for popular tools
- ⚡️ Options for CSS modules, PostCSS, Sass, Less, and Vanilla-extract

## 🏁 Getting Started

To get started, **install the package** using the Storybook CLI

pnpm:

```zsh
pnpm dlx storybook@latest add @storybook/addon-styling-webpack
```

yarn:

```zsh
yarn dlx storybook@latest add @storybook/addon-styling-webpack
```

npm:

```zsh
npx storybook@latest add @storybook/addon-styling-webpack
```

## 🤝 Contributing

If you'd like to contribute to this addon, **THANK YOU**, I'd love your help 🙏

### 📝 Development scripts

- `pnpm build` build and package your addon code

### 🌲 Branch structure

- **next** - the `next` version on npm, and the development branch where most work occurs
- **main** - the `latest` version on npm and the stable version that most users use

### 🚀 Release process

1. All PRs should target the `next` branch, which depends on the `next` version of Storybook.
2. When merged, a new version of this package will be released on the `next` NPM tag.
3. If the change contains a bugfix that needs to be patched back to the stable version, please note that in PR description.
4. PRs labeled `pick` will get cherry-picked back to the `main` branch and will generate a release on the `latest` npm tag.
11 changes: 11 additions & 0 deletions auto.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = {
baseBranch: "main",
labels: [
{
name: "documentation",
releaseType: "none",
},
],
prereleaseBranches: ["next", "prerelease"],
versionBranches: true,
};
81 changes: 81 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
{
"name": "@storybook/addon-styling-webpack",
"version": "0.0.0",
"description": "A base addon for configuring popular styling tools in Webpack",
"keywords": [
"style",
"design",
"webpack",
"configuration",
"storybook-addons"
],
"repository": {
"type": "git",
"url": "https://github.com/storybookjs/addon-styling-webpack"
},
"license": "MIT",
"author": {
"name": "Shaun Evening",
"email": "goodeveningshaun@gmail.com"
},
"exports": {
".": {
"require": "./dist/index.js",
"import": "./dist/index.mjs",
"types": "./dist/index.d.ts"
},
"./preset": {
"require": "./dist/preset.js",
"import": "./dist/preset.mjs",
"types": "./dist/preset.d.ts"
},
"./package.json": "./package.json",
"./postinstall": "./postinstall.js"
},
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"files": [
"bin/**/*",
"dist/**/*",
"README.md",
"*.js",
"*.d.ts"
],
"scripts": {
"build": "tsup",
"build:watch": "pnpm build --watch",
"clean": "rimraf dist && rimraf bin",
"release": "pnpm build && auto shipit"
},
"dependencies": {
"@storybook/node-logger": "^7.0.12"
},
"devDependencies": {
"@types/node": "^16.0.0",
"auto": "^10.3.0",
"prettier": "^2.8.0",
"rimraf": "^3.0.2",
"tsup": "^6.7.0",
"typescript": "^4.9.0",
"webpack": "^5.0.0"
},
"peerDependencies": {
"webpack": "^5.0.0"
},
"packageManager": "yarn@3.6.1",
"publishConfig": {
"access": "public"
},
"storybook": {
"displayName": "Styling-Webpack",
"supportedFrameworks": [
"react",
"vue",
"web-components",
"html",
"preact"
],
"icon": "https://raw.githubusercontent.com/storybookjs/addon-styling/1e17a71614dde4337f402dd5f00d761991d1a9d8/.github/media/styling.svg"
}
}

0 comments on commit f723f3a

Please sign in to comment.