Skip to content

Commit fbc67c2

Browse files
committed
minor #106 Giving the user a nice, default postcss.config.js file (weaverryan)
This PR was merged into the master branch. Discussion ---------- Giving the user a nice, default postcss.config.js file <img width="932" alt="screen shot 2017-07-20 at 10 44 46 pm" src="https://user-images.githubusercontent.com/121003/28447140-0ef29372-6d9d-11e7-954a-610d26fd9d75.png"> We make the user create this file to follow the best practice for configuring the postcss-loader. But let's be as helpful as possible. The `autoprefixer` does not need to be installed by the user, as it's already an indirect dependency of encore (`@symfony/webpack-encore#css-loader#cssnano`). Commits ------- 9639795 Giving the user a nice, default postcss.config.js file
2 parents acc4187 + 9639795 commit fbc67c2

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

lib/friendly-errors/formatters/missing-postcss-config.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,19 @@ function formatErrors(errors) {
2525
);
2626
messages.push('');
2727
messages.push(`${chalk.bgGreen.black('', 'FIX', '')} Create a ${chalk.yellow('postcss.config.js')} file at the root of your project.`);
28+
messages.push('');
29+
messages.push('Here is an example to get you started!')
30+
messages.push(chalk.yellow(`
31+
// postcss.config.js
32+
module.exports = {
33+
plugins: {
34+
'autoprefixer': {},
35+
}
36+
}
37+
`));
2838

2939
messages.push('');
40+
messages.push('')
3041

3142
return messages;
3243
}

0 commit comments

Comments
 (0)