Skip to content

Commit 0dfd3b0

Browse files
authored
Merge pull request #116 from FluentifyJs/feature/fixing-storybook
Correcting issues with storybook and added devcontainer for easy development
2 parents 8b2fd41 + 6400e01 commit 0dfd3b0

File tree

5 files changed

+56
-46
lines changed

5 files changed

+56
-46
lines changed

.devcontainer/Dockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# [Choice] Node.js version: 14, 12, 10
2+
ARG VARIANT=14
3+
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:${VARIANT}
4+
USER root
5+
RUN apt-get update
6+
7+
ARG USER_UID=1000
8+
ARG USER_GID=$USER_UID
9+
RUN if [ "$USER_GID" != "1000" ] || [ "$USER_UID" != "1000" ]; then \
10+
groupmod --gid $USER_GID node \
11+
&& usermod --uid $USER_UID --gid $USER_GID node \
12+
&& chmod -R $USER_UID:$USER_GID /home/node \
13+
&& chmod -R $USER_UID:root /usr/local/share/nvm /usr/local/share/npm-global; \
14+
fi

.devcontainer/devcontainer.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"name": "Node.js",
3+
"build": {
4+
"dockerfile": "Dockerfile",
5+
// Update 'VARIANT' to pick a Node version: 10, 12, 14
6+
"args": { "VARIANT": "14" }
7+
},
8+
9+
// Set *default* container specific settings.json values on container create.
10+
"settings": {
11+
"terminal.integrated.shell.linux": "/bin/bash"
12+
},
13+
14+
// Add the IDs of extensions you want installed when the container is created.
15+
"extensions": [
16+
"dbaeumer.vscode-eslint",
17+
"octref.vetur",
18+
"liuji-jim.vue",
19+
"eamodio.gitlens",
20+
"wix.vscode-import-cost",
21+
"mrmlnc.vscode-scss"
22+
],
23+
24+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
25+
"forwardPorts": [9000],
26+
27+
// Use 'postCreateCommand' to run commands after the container is created.
28+
// "postCreateCommand": "yarn install",
29+
30+
// Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root.
31+
"remoteUser": "node"
32+
}

.storybook/main.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ module.exports = {
1010
// `configType` has a value of 'DEVELOPMENT' or 'PRODUCTION'
1111
// You can change the configuration based on that.
1212
// 'PRODUCTION' is used when building the static version of storybook.
13+
config.watch = true
1314

1415
// Make whatever fine-grained changes you need
1516
config.module.rules.push({

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
![image](https://img.shields.io/npm/dm/@fluentify/fluentify.svg)
55
![image](https://img.shields.io/npm/v/@fluentify/fluentify.svg)
66
![image](https://img.shields.io/npm/l/@fluentify/fluentify.svg)
7-
[![image](https://github.com/FluentifyJs/fluentify/workflows/Javascript%20and%20css%20linting/badge.svg)](https://github.com/FluentifyJs/fluentify/actions?query=workflow%3A%22Javascript+and+css+linting%22)
8-
7+
![Javascript and css linting](https://github.com/FluentifyJs/fluentify/workflows/Javascript%20and%20css%20linting/badge.svg)
8+
![CodeQL](https://github.com/FluentifyJs/fluentify/workflows/CodeQL/badge.svg)
99

10+
### [View demo](https://fluent.ayw.io/)
1011

1112
## This Components framework is *Work in progress*, please keep that in mind that it's not ready for production yet, feel free to contribute and get it ready faster
1213

package.json

Lines changed: 6 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
"author": "Alexander Wennerstrøm <[email protected]>",
66
"scripts": {
77
"build": "vue-cli-service build",
8-
"serve": "vue-cli-service serve",
98
"test": "cross-env BABEL_ENV=test karma start test/karma.conf.js --single-run",
109
"clean": "rimraf dist",
1110
"coverage": "cross-env BABEL_ENV=test karma start test/karma.conf.js",
@@ -16,10 +15,14 @@
1615
"prepublish": "npm run build",
1716
"pretest": "npm run lint",
1817
"storybook:build": "build-storybook",
19-
"storybook:serve": "start-storybook"
18+
"storybook:serve": "start-storybook -p 9000"
19+
},
20+
"dependencies": {
21+
"vue": "^2.6.12"
2022
},
2123
"devDependencies": {
2224
"@babel/core": "^7.11.6",
25+
"@storybook/preset-scss": "^1.0.2",
2326
"@storybook/addon-actions": "^6.0.21",
2427
"@storybook/addon-links": "^6.0.21",
2528
"@storybook/vue": "^6.0.21",
@@ -50,43 +53,6 @@
5053
"bugs": {
5154
"url": "https://github.com/FluentifyJs/fluentify/issues"
5255
},
53-
"dllPlugin": {
54-
"name": "vuePluginTemplateDeps",
55-
"include": [
56-
"mocha/mocha.js",
57-
"!!style-loader!!css-loader!mocha-css",
58-
"html-entities",
59-
"vue/dist/vue.js",
60-
"chai",
61-
"core-js/library",
62-
"url",
63-
"sockjs-client",
64-
"vue-style-loader/lib/addStylesClient.js",
65-
"events",
66-
"ansi-html",
67-
"style-loader/lib/addStyles.js"
68-
],
69-
"loaders": [
70-
"style-loader",
71-
{
72-
"loader": "css-loader",
73-
"options": {
74-
"importLoaders": 1
75-
}
76-
},
77-
{
78-
"loader": "sass-loader",
79-
"options": {
80-
"importLoaders": 1
81-
}
82-
}
83-
]
84-
},
85-
"files": [
86-
"/build/",
87-
"/dist/",
88-
"/src/"
89-
],
9056
"homepage": "https://github.com/FluentifyJs/fluentify#readme",
9157
"keywords": [
9258
"vue",
@@ -114,9 +80,5 @@
11480
"url": "git+https://github.com/FluentifyJs/fluentify.git"
11581
},
11682
"style": "dist/fluentify.css",
117-
"unpkg": "dist/fluentify.js",
118-
"dependencies": {
119-
"@storybook/preset-scss": "^1.0.2",
120-
"vue": "^2.6.12"
121-
}
83+
"unpkg": "dist/fluentify.js"
12284
}

0 commit comments

Comments
 (0)