This repository has been archived by the owner on May 14, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Add theme #5
Draft
thewilkybarkid
wants to merge
15
commits into
libero:master
Choose a base branch
from
thewilkybarkid:theme
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Add theme #5
Changes from 12 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
8fa17b3
Set up basic development environment
thewilkybarkid 322ae87
Use newer Docker Compose
thewilkybarkid d7033c5
Simplify to just dev
thewilkybarkid 51ac72d
Fix Travis
thewilkybarkid 9ad1906
Improve commands
thewilkybarkid 8b72633
Expand
thewilkybarkid 477e3b5
Singular
thewilkybarkid 5dbba81
Not yet!
thewilkybarkid 9363f6a
Not needed
thewilkybarkid c59db6c
Install Storybook
thewilkybarkid 617be8a
Avoid relying on volume
thewilkybarkid 639d226
Add theme
thewilkybarkid dd24eee
Merge branch 'master' into theme
thewilkybarkid 97ec47d
Not needed
thewilkybarkid b64847c
Connect to the Sass
thewilkybarkid File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import {addParameters, configure} from '@storybook/html'; | ||
import theme from './theme'; | ||
|
||
const context = require.context('../src', true, /\.stories\.js$/); | ||
|
||
addParameters({ | ||
options: { | ||
theme: theme, | ||
}, | ||
}); | ||
|
||
configure(context, module); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import {create} from '@storybook/theming' | ||
|
||
export default create({ | ||
base: 'light', | ||
brandTitle: 'Libero Publisher', | ||
brandUrl: 'https://libero.pub/', | ||
colorPrimary: 'rgb(2, 136, 209)', | ||
colorSecondary: 'rgb(2, 119, 189)', | ||
appBg: 'rgb(255, 255, 255)', | ||
appContentBg: 'rgb(255, 255, 255)', | ||
appBorderColor: 'rgb(224, 224, 224)', | ||
appBorderRadius: 4, | ||
textColor: 'rgb(33, 33, 33)', | ||
textInverseColor: 'rgb(255, 255, 255)', | ||
barTextColor: 'rgb(136, 136, 136)', | ||
barSelectedColor: 'rgb(33, 33, 33)', | ||
barBg: 'rgb(179, 229, 252)', | ||
inputBg: 'rgb(255, 255, 255)', | ||
inputBorder: 'rgb(2, 119, 189)', | ||
inputTextColor: 'rgb(255, 255, 255)', | ||
inputBorderRadius: 4, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,13 @@ | ||
language: minimal | ||
|
||
dist: bionic | ||
|
||
services: docker | ||
|
||
install: | ||
- make build | ||
|
||
script: | ||
- 'true' | ||
- make start | ||
- make logs | ||
- make stop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
FROM node:10.16.3-alpine AS node | ||
WORKDIR /app | ||
|
||
|
||
|
||
# | ||
# Stage: NPM install | ||
# | ||
FROM node AS npm | ||
|
||
COPY package.json \ | ||
package-lock.json \ | ||
./ | ||
|
||
RUN npm install | ||
|
||
|
||
|
||
# | ||
# Stage: Storybook environment | ||
# | ||
FROM node AS storybook | ||
|
||
COPY --from=npm /app/ . | ||
COPY .storybook/ .storybook/ | ||
COPY src/ src/ | ||
|
||
|
||
|
||
# | ||
# Stage: Development environment | ||
# | ||
FROM storybook AS dev | ||
ENV NODE_ENV=development | ||
EXPOSE 8080 | ||
|
||
CMD ["npx", "start-storybook", "--port", "8080"] | ||
|
||
HEALTHCHECK --interval=30s --timeout=1s \ | ||
CMD wget --quiet --tries=1 --spider http://localhost:8080/ || exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
.DEFAULT_GOAL = help | ||
|
||
DEV = docker-compose --file docker-compose.dev.yml | ||
|
||
help: ## Display this help text | ||
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | ||
|
||
install: ## Install dependencies locally | ||
npm install | ||
|
||
build: ## Build the container | ||
${DEV} build --pull | ||
|
||
start: build ## Start the container | ||
${DEV} up --detach | ||
|
||
exec: ## Execute a command on the container | ||
${DEV} exec app $(cmd) | ||
|
||
sh: ## Open a shell on the container | ||
${DEV} exec app sh | ||
|
||
logs: ## Show the container's log | ||
${DEV} logs | ||
|
||
watch: ## Follow the container's log | ||
${DEV} logs --follow | ||
|
||
stop: ## Stop the container | ||
${DEV} down --volumes --remove-orphans |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
version: '3.4' | ||
|
||
services: | ||
app: | ||
build: | ||
context: . | ||
target: dev | ||
ports: | ||
- 8080:8080 | ||
volumes: | ||
- ./src/:/app/src:ro |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done an experiment locally, and reasonably straightforward to get this values from Sass using Webpack.