-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
For now only cozy-harvest-lib is concerned but setting styleguidist up on monorepo root will allow us to easily generate doc for other packages in the future.
- Loading branch information
1 parent
54849d7
commit b9659dd
Showing
6 changed files
with
3,306 additions
and
103 deletions.
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 |
---|---|---|
|
@@ -2,3 +2,4 @@ node_modules | |
*.log | ||
dist | ||
coverage | ||
docs/build |
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,3 @@ | ||
module.exports = { | ||
presets: ['cozy-app'] | ||
} |
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,43 @@ | ||
const MiniCssExtractPlugin = require('mini-css-extract-plugin') | ||
const webpack = require('webpack') | ||
|
||
const lib = process.env.TARGET | ||
const styleguideDir = `./build${lib ? `/${lib}` : ''}` | ||
|
||
module.exports = { | ||
components: `../packages/${lib || '**'}/src/components/**/*.jsx`, | ||
serverPort: 6262, | ||
styleguideDir, | ||
webpackConfig: { | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.jsx?$/, | ||
exclude: /node_modules\/(?!(cozy-ui)\/).*/, | ||
loader: 'babel-loader' | ||
}, | ||
{ | ||
test: /node_modules\/cozy-ui\/(.*)\.styl$/, | ||
loader: [ | ||
MiniCssExtractPlugin.loader, | ||
{ | ||
loader: 'css-loader', | ||
options: { | ||
modules: true, | ||
localIdentName: '[local]--[hash:base64:5]' | ||
} | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
plugins: [ | ||
new MiniCssExtractPlugin('[name].css'), | ||
new webpack.DefinePlugin({ | ||
'process.env': { | ||
USE_REACT: 'true' | ||
} | ||
}) | ||
] | ||
} | ||
} |
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
Oops, something went wrong.