https://github.com/gabrielecanepa/webpack-init
Generate a preconfigured webpack boilerplate from your shell - ideal for quick prototypes ⚡️
https://github.com/gabrielecanepa/webpack-init
babel eslint github-page scss stylelint webpack webpack-boilerplate yarn
Last synced: 3 months ago
JSON representation
Generate a preconfigured webpack boilerplate from your shell - ideal for quick prototypes ⚡️
- Host: GitHub
- URL: https://github.com/gabrielecanepa/webpack-init
- Owner: gabrielecanepa
- License: mit
- Created: 2018-12-09T15:15:30.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-10-12T16:14:20.000Z (over 2 years ago)
- Last Synced: 2025-10-24T21:05:22.780Z (8 months ago)
- Topics: babel, eslint, github-page, scss, stylelint, webpack, webpack-boilerplate, yarn
- Homepage:
- Size: 787 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: .github/README.md
Awesome Lists containing this project
README
# Webpack Init
Generate a preconfigured webpack boilerplate from your shell - ideal for quick prototypes ⚡️
## Usage
Clone the repository on your computer. You must have [Node.js](https://nodejs.org) (> v4) and [Yarn](https://yarnpkg.com/lang/en/docs/install) installed:
```sh
git clone git@github.com:gabrielecanepa/webpack-init
# or
gh repo clone gabrielecanepa/webpack-init
cd webpack-init
```
Run the `.webpack-init` script once. The executable will be copied into your root folder and an alias will be set in your first available profile:
```sh
sh .webpack-init
```

After restarting the terminal, you will be able to run `webpack:init` from any place on your computer.
The command initializes a new repository with a ready-to-use [webpack boilerplate](https://github.com/gabrielecanepa/webpack-boilerplate) with the following configuration:
- [Yarn](https://yarnpkg.com)
- [webpack](https://webpack.js.org)
- [Babel](https://babeljs.io) with [latest preset](https://babeljs.io/docs/en/babel-preset-env)
- [ESLint](https://eslint.org) with [Airbnb configuration](https://www.npmjs.com/package/eslint-config-airbnb-base) base
- [Sass](http://sass-lang.com) with [stylelint](https://stylelint.io) and modules import to enjoy hot reloading
- [GitHub Pages](https://www.npmjs.com/package/gh-pages) for easy deployment

Make sure you have `./node_modules/.bin` in your `$PATH`. This way you can run your server with:
```sh
webpack-dev-server
```

### Scripts
To speed up the development process, some scripts have been defined in `package.json`.
To start a local server on port `8080`:
```bash
yarn start
```
To lint all your JavaScript and CSS/SCSS files:
```bash
yarn lint
```
To build your static files:
```bash
yarn build
```
To push the built files to the `gh-pages` branch and deploy to [GitHub Pages](https://pages.github.com):
```bash
yarn deploy
```