Skip to content

Commit 141fae2

Browse files
committed
docs(README): Add configuration file description
1 parent 888ef0d commit 141fae2

File tree

8 files changed

+184
-8
lines changed

8 files changed

+184
-8
lines changed

README.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,29 @@ With npm
6464

6565
You can include an optional configuration file : **monopack.config.js**
6666

67-
_TODO_
67+
This configuration file can be used to :
68+
69+
* Define the monorepo root
70+
* Override the default babel configuration
71+
* Override the default webpack configuration
72+
73+
The config file can export 3 entries :
74+
75+
* monorepoRootPath : the relative path to the monorepo root.
76+
* babelConfigModifier : a function that takes the current configuration and returns the modified configuration.
77+
* webpackConfigModifier: a function that takes the current configuration and returns the modified configuration.
78+
79+
For example :
80+
81+
```js
82+
module.exports.monorepoRootPath = '../..';
83+
module.exports.babelConfigModifier = defaultBabelConfiguration => {
84+
return babelConfiguration(defaultBabelConfiguration);
85+
};
86+
module.exports.webpackConfigModifier = defaultWebpackConfig => {
87+
return webPackConfiguration(defaultWebpackConfig);
88+
};
89+
```
6890

6991
## Why such a tool ?
7092

packages/monopack-builder/README.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,29 @@ With npm
6464

6565
You can include an optional configuration file : **monopack.config.js**
6666

67-
_TODO_
67+
This configuration file can be used to :
68+
69+
* Define the monorepo root
70+
* Override the default babel configuration
71+
* Override the default webpack configuration
72+
73+
The config file can export 3 entries :
74+
75+
* monorepoRootPath : the relative path to the monorepo root.
76+
* babelConfigModifier : a function that takes the current configuration and returns the modified configuration.
77+
* webpackConfigModifier: a function that takes the current configuration and returns the modified configuration.
78+
79+
For example :
80+
81+
```js
82+
module.exports.monorepoRootPath = '../..';
83+
module.exports.babelConfigModifier = defaultBabelConfiguration => {
84+
return babelConfiguration(defaultBabelConfiguration);
85+
};
86+
module.exports.webpackConfigModifier = defaultWebpackConfig => {
87+
return webPackConfiguration(defaultWebpackConfig);
88+
};
89+
```
6890

6991
## Why such a tool ?
7092

packages/monopack-cli/README.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,29 @@ With npm
6464

6565
You can include an optional configuration file : **monopack.config.js**
6666

67-
_TODO_
67+
This configuration file can be used to :
68+
69+
* Define the monorepo root
70+
* Override the default babel configuration
71+
* Override the default webpack configuration
72+
73+
The config file can export 3 entries :
74+
75+
* monorepoRootPath : the relative path to the monorepo root.
76+
* babelConfigModifier : a function that takes the current configuration and returns the modified configuration.
77+
* webpackConfigModifier: a function that takes the current configuration and returns the modified configuration.
78+
79+
For example :
80+
81+
```js
82+
module.exports.monorepoRootPath = '../..';
83+
module.exports.babelConfigModifier = defaultBabelConfiguration => {
84+
return babelConfiguration(defaultBabelConfiguration);
85+
};
86+
module.exports.webpackConfigModifier = defaultWebpackConfig => {
87+
return webPackConfiguration(defaultWebpackConfig);
88+
};
89+
```
6890

6991
## Why such a tool ?
7092

packages/monopack-config/README.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,29 @@ With npm
6464

6565
You can include an optional configuration file : **monopack.config.js**
6666

67-
_TODO_
67+
This configuration file can be used to :
68+
69+
* Define the monorepo root
70+
* Override the default babel configuration
71+
* Override the default webpack configuration
72+
73+
The config file can export 3 entries :
74+
75+
* monorepoRootPath : the relative path to the monorepo root.
76+
* babelConfigModifier : a function that takes the current configuration and returns the modified configuration.
77+
* webpackConfigModifier: a function that takes the current configuration and returns the modified configuration.
78+
79+
For example :
80+
81+
```js
82+
module.exports.monorepoRootPath = '../..';
83+
module.exports.babelConfigModifier = defaultBabelConfiguration => {
84+
return babelConfiguration(defaultBabelConfiguration);
85+
};
86+
module.exports.webpackConfigModifier = defaultWebpackConfig => {
87+
return webPackConfiguration(defaultWebpackConfig);
88+
};
89+
```
6890

6991
## Why such a tool ?
7092

packages/monopack-dependency-collector/README.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,29 @@ With npm
6464

6565
You can include an optional configuration file : **monopack.config.js**
6666

67-
_TODO_
67+
This configuration file can be used to :
68+
69+
* Define the monorepo root
70+
* Override the default babel configuration
71+
* Override the default webpack configuration
72+
73+
The config file can export 3 entries :
74+
75+
* monorepoRootPath : the relative path to the monorepo root.
76+
* babelConfigModifier : a function that takes the current configuration and returns the modified configuration.
77+
* webpackConfigModifier: a function that takes the current configuration and returns the modified configuration.
78+
79+
For example :
80+
81+
```js
82+
module.exports.monorepoRootPath = '../..';
83+
module.exports.babelConfigModifier = defaultBabelConfiguration => {
84+
return babelConfiguration(defaultBabelConfiguration);
85+
};
86+
module.exports.webpackConfigModifier = defaultWebpackConfig => {
87+
return webPackConfiguration(defaultWebpackConfig);
88+
};
89+
```
6890

6991
## Why such a tool ?
7092

packages/monopack-process/README.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,29 @@ With npm
6464

6565
You can include an optional configuration file : **monopack.config.js**
6666

67-
_TODO_
67+
This configuration file can be used to :
68+
69+
* Define the monorepo root
70+
* Override the default babel configuration
71+
* Override the default webpack configuration
72+
73+
The config file can export 3 entries :
74+
75+
* monorepoRootPath : the relative path to the monorepo root.
76+
* babelConfigModifier : a function that takes the current configuration and returns the modified configuration.
77+
* webpackConfigModifier: a function that takes the current configuration and returns the modified configuration.
78+
79+
For example :
80+
81+
```js
82+
module.exports.monorepoRootPath = '../..';
83+
module.exports.babelConfigModifier = defaultBabelConfiguration => {
84+
return babelConfiguration(defaultBabelConfiguration);
85+
};
86+
module.exports.webpackConfigModifier = defaultWebpackConfig => {
87+
return webPackConfiguration(defaultWebpackConfig);
88+
};
89+
```
6890

6991
## Why such a tool ?
7092

packages/monopack-repo-builder/README.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,29 @@ With npm
6464

6565
You can include an optional configuration file : **monopack.config.js**
6666

67-
_TODO_
67+
This configuration file can be used to :
68+
69+
* Define the monorepo root
70+
* Override the default babel configuration
71+
* Override the default webpack configuration
72+
73+
The config file can export 3 entries :
74+
75+
* monorepoRootPath : the relative path to the monorepo root.
76+
* babelConfigModifier : a function that takes the current configuration and returns the modified configuration.
77+
* webpackConfigModifier: a function that takes the current configuration and returns the modified configuration.
78+
79+
For example :
80+
81+
```js
82+
module.exports.monorepoRootPath = '../..';
83+
module.exports.babelConfigModifier = defaultBabelConfiguration => {
84+
return babelConfiguration(defaultBabelConfiguration);
85+
};
86+
module.exports.webpackConfigModifier = defaultWebpackConfig => {
87+
return webPackConfiguration(defaultWebpackConfig);
88+
};
89+
```
6890

6991
## Why such a tool ?
7092

packages/monopack/README.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,29 @@ With npm
6464

6565
You can include an optional configuration file : **monopack.config.js**
6666

67-
_TODO_
67+
This configuration file can be used to :
68+
69+
* Define the monorepo root
70+
* Override the default babel configuration
71+
* Override the default webpack configuration
72+
73+
The config file can export 3 entries :
74+
75+
* monorepoRootPath : the relative path to the monorepo root.
76+
* babelConfigModifier : a function that takes the current configuration and returns the modified configuration.
77+
* webpackConfigModifier: a function that takes the current configuration and returns the modified configuration.
78+
79+
For example :
80+
81+
```js
82+
module.exports.monorepoRootPath = '../..';
83+
module.exports.babelConfigModifier = defaultBabelConfiguration => {
84+
return babelConfiguration(defaultBabelConfiguration);
85+
};
86+
module.exports.webpackConfigModifier = defaultWebpackConfig => {
87+
return webPackConfiguration(defaultWebpackConfig);
88+
};
89+
```
6890

6991
## Why such a tool ?
7092

0 commit comments

Comments
 (0)