Skip to content

Commit 0032c8e

Browse files
committed
auto-deploy
1 parent 7220ea4 commit 0032c8e

File tree

6 files changed

+15
-91
lines changed

6 files changed

+15
-91
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
* linguist-language=TypeScript
2+
config/*.js linguist-vendored

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,6 @@ npm-debug.log*
2323
yarn-debug.log*
2424
yarn-error.log*
2525

26-
dist/*
26+
dist/*
27+
temp/*
28+
!dist/.gitkeep

README.md

Lines changed: 2 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,3 @@
1+
# react-declarative-storybook
12

2-
<p align="center">
3-
<a href="https://www.chromatic.com/">
4-
<img alt="Chromatic" src="https://avatars2.githubusercontent.com/u/24584319?s=200&v=4" width="60" />
5-
</a>
6-
</p>
7-
8-
<h1 align="center">
9-
Chromatic's Intro to Storybook React template
10-
</h1>
11-
12-
This template ships with the main React and Storybook configuration files you'll need to get up and running fast.
13-
14-
## 🚅 Quick start
15-
16-
1. **Create the application.**
17-
18-
Use [degit](https://github.com/Rich-Harris/degit) to get this template.
19-
20-
```shell
21-
# Clone the template
22-
npx degit chromaui/intro-storybook-react-template taskbox
23-
```
24-
25-
1. **Install the dependencies.**
26-
27-
Navigate into your new site’s directory and install the necessary dependencies.
28-
29-
```shell
30-
# Navigate to the directory
31-
cd taskbox/
32-
33-
# Install the dependencies
34-
yarn
35-
```
36-
37-
1. **Open the source code and start editing!**
38-
39-
Open the `taskbox` directory in your code editor of choice and building your first component!
40-
41-
1. **Browse your stories!**
42-
43-
Run `yarn storybook` to see your component's stories at `http://localhost:6006`
44-
45-
## 🔎 What's inside?
46-
47-
A quick look at the top-level files and directories included with this template.
48-
49-
.
50-
├── .storybook
51-
├── node_modules
52-
├── public
53-
├── src
54-
├── .env
55-
├── .gitignore
56-
├── LICENSE
57-
├── package.json
58-
├── yarn.lock
59-
└── README.md
60-
61-
62-
1. **`.storybook`**: This directory contains Storybook's [configuration](https://storybook.js.org/docs/react/configure/overview) files.
63-
64-
2. **`node_modules`**: This directory contains all of the modules of code that your project depends on (npm packages).
65-
66-
3. **`public`**: This directory will contain the development and production build of the site.
67-
68-
4. **`src`**: This directory will contain all of the code related to what you will see on your application.
69-
70-
5. **`.env`**: Simple text configuration file for controlling the application's environment constants.
71-
72-
6. **`.gitignore`**: This file tells git which files it should not track or maintain during the development process of your project.
73-
74-
7. **`LICENSE`**: The template is licensed under the MIT licence.
75-
76-
8. **`package.json`**: Standard manifest file for Node.js projects, which typically includes project specific metadata (such as the project's name, the author among other information). It's based on this file that npm will know which packages are necessary to the project.
77-
78-
9. **`yarn.lock`**: This is an automatically generated file based on the exact versions of your npm dependencies that were installed for your project. **(Do not change it manually).**
79-
80-
10. **`README.md`**: A text file containing useful reference information about the project.
81-
82-
## Contribute
83-
84-
If you encounter an issue with the template, we encourage you to open an issue in this template's repository.
85-
86-
## Learning Storybook
87-
88-
1. Read our introductory tutorial at [Learn Storybook](https://storybook.js.org/tutorials/intro-to-storybook/react/en/get-started/).
89-
2. Learn how to transform your component libraries into design systems in our [Design Systems for Developers](https://storybook.js.org/tutorials/design-systems-for-developers/) tutorial.
90-
2. See our official documentation at [Storybook](https://storybook.js.org/).
3+
> An online preview available on [https://react-declarative.github.io/](https://react-declarative.github.io/)

_config.yml

Whitespace-only changes.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"scripts": {
2020
"start": "start-storybook -p 6006 -c ./config",
2121
"build": "build-storybook -c ./config -o ./dist",
22-
"deploy": "git subtree push --prefix ./dist origin gh-pages"
22+
"deploy": "npm run build && sh ./scripts/gh-deploy.sh"
2323
},
2424
"eslintConfig": {
2525
"extends": [

scripts/gh-deploy.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
rm -rf ./temp
2+
git clone https://github.com/react-declarative/react-declarative.github.io.git ./temp
3+
cp -rlf ./dist/* ./temp
4+
cd temp
5+
git add *
6+
git commit -m $(date +%s)
7+
git push

0 commit comments

Comments
 (0)