CodeCoupler Webpack Setup
Recommended Visual Code Setup
CodeCoupler Webpack uses ESLint and Prettier to lint and fix JavaScript, Vue, and TypeScript files,
and stylelint to lint stylesheet files. The boilerplate generates the necessary configuration files
to lint these files, as well as Markdown files, on save with markdownlint.
To make this work you have to install the following extensions:
If you are developing with Vue you should also install:
Also recommended, but not mandatory
-
A minimal configuration for linting Markdown files is included, which uses the following extension:
-
Installing this extension will automatically wrap comments and Markdown code. It also allows you to manually rewrap your comments to the rulers configured by the boilerplate (80, 100, 120):
-
The Markdownlint extension does not format tables. This extension can close this gap:
Initialize a new Project with Boilerplate
Create a new directory and initialize a Git repository. This is useful because the next commands will install Git hooks:
Initialize the boilerplate and install the packages. Always use the "latest" tag, otherwise you will use the last version you downloaded:
Initialize without Boilerplate
Change to your project directory and install it as development dependency:
If you do not have an ESLint configuration you have to create one:
Change your webpack.config.js 2:
-
Up to version 2.1, the package
@codecoupler/create-cc-webpackwas optimized for use with Vetur. Starting with version 2.2, it is optimized for Volar. ↩ -
These instructions are only valid for version 4 and higher. For earlier versions, you must use the CodeCoupler Webpack CLI and separate configuration files. ↩