Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/m-anwar-hussaini/webpack-linters-configurations

If you are full familiar with the webpack, this repo will save lots of your time configuring webpack and linters.
https://github.com/m-anwar-hussaini/webpack-linters-configurations

webpack webpack-plugin

Last synced: 19 days ago
JSON representation

If you are full familiar with the webpack, this repo will save lots of your time configuring webpack and linters.

Awesome Lists containing this project

README

        

# WebPack Configurations:

1. Download this repository.
2. Copy the content of it to your own newly-created repo and run the following commands consecutively.
3. Initialize `npm`:

```sh
npm init -y
```

4. Install WebPack

```sh
npm install webpack webpack-cli --save-dev
```

5. Install style-loader and css-loader.

```sh
npm install --save-dev style-loader css-loader
```

6. install HtmlWebpackPlugin plugin:

```sh
npm install --save-dev html-webpack-plugin
```

7. Install webpack-dev-server:

```sh
npm install --save-dev webpack-dev-server
```

8. Go to the `package.json` file and in the script property replace the following code with its previous value:

```sh
"test": "echo \"Error: no test specified\" && exit 1",
"start": "webpack serve --open",
"build": "webpack"
```

9. Run following command to generate dist directory and its necessary file:

```sh
npm run build
```

10. Run following command to run project on the default browser using webpack-dev-server:

```sh
npm start
```

# Linters Configurations:

1. Install Webhint:

```sh
npm install --save-dev [email protected]
```

2. Install stylelint:

```sh
npm install --save-dev [email protected] [email protected] [email protected] [email protected]
```

3. Install ESLint:

```sh
npm install --save-dev [email protected] [email protected] [email protected] [email protected]
```