Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

Storybook route #35

Merged
merged 34 commits into from
Nov 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
7b983e9
Storybook route
BeeMargarida Nov 4, 2020
2238deb
Update vercel script
BeeMargarida Nov 4, 2020
96fe25c
Try with new routes
BeeMargarida Nov 4, 2020
2e44946
No dll option and reverted routes
BeeMargarida Nov 4, 2020
6991fec
Another try
BeeMargarida Nov 4, 2020
2689d16
Removed dll
BeeMargarida Nov 4, 2020
c3f9fb1
Fix
BeeMargarida Nov 4, 2020
3c3e192
Changed dist dir
BeeMargarida Nov 4, 2020
0d6d470
Revert vercel.json and changed storybook webpack
BeeMargarida Nov 4, 2020
0ff6072
Simplify approach
BeeMargarida Nov 4, 2020
3326cdc
Another try
BeeMargarida Nov 4, 2020
843bbc9
Another try
BeeMargarida Nov 4, 2020
60be75f
Try with forcing webpack version
BeeMargarida Nov 4, 2020
d5ee2fc
Revert storybook webpack config
BeeMargarida Nov 4, 2020
ad9ea10
Fix
BeeMargarida Nov 4, 2020
b229fb4
Put back the routes
BeeMargarida Nov 4, 2020
e655270
Fix script
BeeMargarida Nov 4, 2020
28372e6
More fixes
BeeMargarida Nov 4, 2020
87b69fd
Change dist dir
BeeMargarida Nov 4, 2020
22d5a15
Another setup
BeeMargarida Nov 4, 2020
06ca73a
Try
BeeMargarida Nov 4, 2020
b9ef808
Simple
BeeMargarida Nov 4, 2020
ce1dbf9
Fix
BeeMargarida Nov 4, 2020
4144a2a
Added styleguide route
BeeMargarida Nov 4, 2020
a3052b8
Fix
BeeMargarida Nov 4, 2020
6c452a7
Fix
BeeMargarida Nov 5, 2020
b4382ef
Revert
BeeMargarida Nov 5, 2020
ebb7af1
Fix conflicts
BeeMargarida Nov 5, 2020
49c0ed1
Revert manager-head and vercel
BeeMargarida Nov 5, 2020
027a388
Fix documentation and reverted unnecessary changes
BeeMargarida Nov 5, 2020
9804c09
Cleanup
BeeMargarida Nov 5, 2020
bd73bf5
Removed unnecessary config
BeeMargarida Nov 5, 2020
4b4a694
Moved regenerator runtime to styleguide config
BeeMargarida Nov 5, 2020
a991b0c
Fix
BeeMargarida Nov 5, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
},
"devDependencies": {
"@babel/core": "^7.12.3",
"@babel/plugin-transform-runtime": "^7.12.1",
"@babel/preset-env": "^7.12.1",
"@storybook/addon-knobs": "^6.0.28",
"@storybook/addon-storysource": "^6.0.28",
Expand Down Expand Up @@ -101,7 +102,7 @@
"vue-loader": "^15.9.5",
"vue-styleguidist": "^4.33.5",
"vue-template-compiler": "^2.6.12",
"webpack": "^5.4.0",
"webpack": "^4.44.2",
"webpack-cli": "^4.2.0",
"webpack-dev-server": "^3.11.0"
},
Expand Down
44 changes: 43 additions & 1 deletion styleguide.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,48 @@
const config = require("./webpack.config");

// remove babel-loader rule and replace it with one that includes
// the regeneratorRuntime
config.module.rules = config.module.rules.filter(rule => String(rule.test) !== String(/\.js$/));
config.module.rules.push({
test: /\.js$/,
exclude: /node_modules\/(?!ripe-sdk)/,
use: [
{
loader: "babel-loader",
options: {
presets: [
process.env.NODE_ENV === "development"
? [
"@babel/preset-env",
{
targets: {
browsers: ["last 2 years"]
},
useBuiltIns: "entry",
corejs: "3"
}
]
: "@babel/preset-env"
],
plugins: [
[
"@babel/plugin-transform-runtime",
{
regenerator: true
}
]
]
}
},
{
loader: "eslint-loader"
}
]
});

module.exports = {
styleguideDir: "dist/styleguide",
webpackConfig: Object.assign({}, require("./webpack.config"), {
webpackConfig: Object.assign({}, config, {
externals: {}
}),
sections: [
Expand Down
2 changes: 1 addition & 1 deletion vercel.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
}
],
"routes": [
{ "src": "/", "dest": "/storybook/index.html" },
{ "src": "/storybook", "dest": "/storybook/index.html" },
{ "src": "/(?!res)(.*)", "dest": "/styleguide/$1" }
]
}