# webpack2-react-sass-env-boilerplate

> This package includes everything you need to start building an application with Webpack 3, React and SASS.

Latest version **0.2.6** (published 2017-08-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install webpack2-react-sass-env-boilerplate
pnpm add webpack2-react-sass-env-boilerplate
yarn add webpack2-react-sass-env-boilerplate
bun add webpack2-react-sass-env-boilerplate
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.6 |
| Published | 2017-08-08 |
| First published | 2017-03-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 29 |
| Known vulnerabilities | 0 (+10 in 3 direct dependencies) |
| Install scripts | no |
| GitHub stars | 4 |
| Maintainers | jaredlunde |

## Links

- npm: https://www.npmjs.com/package/webpack2-react-sass-env-boilerplate
- Repository: https://github.com/jaredlunde/webpack2-react-sass-env-boilerplate
- Homepage: https://github.com/jaredlunde/webpack2-react-sass-env-boilerplate#readme
- Issues: https://github.com/jaredlunde/webpack2-react-sass-env-boilerplate/issues
- npm.io page: https://npm.io/package/webpack2-react-sass-env-boilerplate

## Dependencies (29)

- [react](https://npm.io/package/react.md) ^15.5.4
- [webpack](https://npm.io/package/webpack.md) ^2.4.1
- [babel-cli](https://npm.io/package/babel-cli.md) ^6.24.1
- [cross-env](https://npm.io/package/cross-env.md) ^3.2.4
- [node-sass](https://npm.io/package/node-sass.md) ^4.5.2
- [react-dom](https://npm.io/package/react-dom.md) ^15.5.4
- [babel-core](https://npm.io/package/babel-core.md) ^6.24.1
- [css-loader](https://npm.io/package/css-loader.md) ^0.28.0
- [prop-types](https://npm.io/package/prop-types.md) ^15.5.8
- [file-loader](https://npm.io/package/file-loader.md) ^0.11.1
- [sass-loader](https://npm.io/package/sass-loader.md) ^6.0.3
- [babel-loader](https://npm.io/package/babel-loader.md) ^6.4.1
- [strip-loader](https://npm.io/package/strip-loader.md) ^0.1.2
- [style-loader](https://npm.io/package/style-loader.md) ^0.16.1
- [babel-polyfill](https://npm.io/package/babel-polyfill.md) ^6.23.0
- [babel-preset-env](https://npm.io/package/babel-preset-env.md) ^1.4.0
- [react-hot-loader](https://npm.io/package/react-hot-loader.md) ^3.0.0-beta.6
- [webpack-dashboard](https://npm.io/package/webpack-dashboard.md) ^0.3.0
- [babel-preset-react](https://npm.io/package/babel-preset-react.md) ^6.24.1
- [webpack-dev-server](https://npm.io/package/webpack-dev-server.md) ^2.4.2
- [html-webpack-plugin](https://npm.io/package/html-webpack-plugin.md) ^2.28.0
- [babel-preset-stage-0](https://npm.io/package/babel-preset-stage-0.md) ^6.24.1
- [webpack-dev-middleware](https://npm.io/package/webpack-dev-middleware.md) ^1.10.1
- [webpack-hot-middleware](https://npm.io/package/webpack-hot-middleware.md) ^2.18.0
- [modernizr-webpack-plugin](https://npm.io/package/modernizr-webpack-plugin.md) ^1.0.5
- [babel-preset-react-optimize](https://npm.io/package/babel-preset-react-optimize.md) ^1.0.1
- [extract-text-webpack-plugin](https://npm.io/package/extract-text-webpack-plugin.md) ^2.1.0
- [group-css-media-queries-loader](https://npm.io/package/group-css-media-queries-loader.md) ^1.0.0
- [babel-plugin-transform-decorators-legacy](https://npm.io/package/babel-plugin-transform-decorators-legacy.md) ^1.3.4

## Recent versions

- 0.2.6 (latest) — 2017-08-08
- 0.2.0-alpha.1 (next) — 2017-04-17
- 0.2.5 — 2017-08-08
- 0.2.4 — 2017-08-04
- 0.2.3 — 2017-04-23
- 0.2.2 — 2017-04-18
- 0.2.1 — 2017-04-17
- 0.2.0 — 2017-04-17
- 0.2.0-alpha.0 — 2017-04-17
- 0.2.0-alpha — 2017-04-17
- 0.1.15 — 2017-03-28
- 0.1.14 — 2017-03-09
- 0.1.13 — 2017-03-09
- 0.1.12 — 2017-03-09
- 0.1.11 — 2017-03-09
- … 12 more at https://npm.io/package/webpack2-react-sass-env-boilerplate/versions

## README

# webpack2-react-sass-env-boilerplate
### A boilerplate for creating applications with Webpack 3+, Babel w/ babel-preset-env, React and SASS.

This package includes everything you need to start building an application with
Webpack 3, React and SASS.

## To use with a bash script:
1. Create `create-app` executable
```sh
echo '#!/bin/bash
if [ -z "$1" ]; then
  echo "No package name was provided."
  exit 1
fi

PKG_NAME=$1
mkdir $PKG_NAME
cd $PKG_NAME
npm init -y
npm install webpack2-react-sass-env-boilerplate
cp -r ./node_modules/webpack2-react-sass-env-boilerplate/. ./
mv package.json.tpl package.json
find . -type f \( -name "*.html" -o -name "*.js" -o -name "*.ejs" -o -name "*.json" \) -and -not -path "*/node_modules/*" -exec sed -i.bak -e "s/{{PKG_NAME}}/${PKG_NAME}/g" {} \;;
find . -type f -name "*.bak" -and -not -path "*/node_modules/*" -exec rm {} \;;
mv "./assets/css/{{PKG_NAME}}" "./assets/css/${PKG_NAME}"
npm start' > create-app
```

2. Make sure you can execute the script
```sh
chmod 0744 create-app
```

3. Execute the script w/ a package name
```sh
./create-app your-pkg-name
```

### package.json
Here you'll find a list of devDependencies for creating this type of
application, however, they are listed under 'dependencies' since I use this
project as a grouped devDependency in my personal projects.


### package.json.tpl
Here is an example of what your package.json might look like, were you to
use this package as a devDependency. Should you choose to do so, you can
install this package with the command:

`npm install --save-dev webpack2-react-sass-env-boilerplate`


### server.js
Using the command `NODE_ENV=development && node server.js` will start your
application with hot module reloading on port `:3000` of your localhost, using
the webpack configuration at `webpack.config.dev.js` and the index file at
`index.html`.


### webpack.config.dev.js
This is an example of a basic development webpack configuration file for this
type of application.


### webpack.config.js
This is an example of a basic distribution webpack configuration file for this
type of application. Commented out are examples of implementing Modernizr and
http2 aggressive code splitting.


### .babelrc
This is an example of a basic Babel 6 configuration utilizing babel-preset-env.


### /src
This is where example index files for both hot reloading (`index.hot.js`) and
distribution builds (`index.js`) are located, as well as the 'Hello world'
React component (`App.js`).


### /assets
Development Javascript files are output to this folder from
`webpack.config.dev.js` and static assets such as images and SASS can be
placed in here.

---
_Source: https://npm.io/package/webpack2-react-sass-env-boilerplate · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
