GithubHelp home page GithubHelp logo

lrenhrda / no-framework-webpack-boilerplate Goto Github PK

View Code? Open in Web Editor NEW

This project forked from notspecial/webpack-babel-eslint

0.0 2.0 0.0 129 KB

A boilerplate containing essential build tools usable with any framework.

License: MIT License

JavaScript 69.38% Dockerfile 16.94% HTML 6.20% CSS 7.48%

no-framework-webpack-boilerplate's Introduction

no-framework-webpack-boilerplate

Based on NotSpecial/webpack-babel-eslint.

A boilerplate containing essential build tools. It uses Webpack and includes the Webpack Dev Server with hot-reloading for easy development and Babel, UglifyJS and a optimized production config for Webpack to build transpiled, minified .js files along with gzipped files.

Furthermore ESLint, preconfigured to use the Standard Style, is provided to check your code. (Feel free to adjust .eslintrc to you needs)

Finally, a Dockerfile is included that uses a two-stage build to create a final image that only contains the built files and the small http-server, which can server the files (and the gzipped versions) and nothing else, ready to deploy in any cluster.

Contrary to other boilerplates, only build tools are included, and you are free to choose whatever framework you like and get started quickly!

Setup

Clone this repository and run npm install to install all dependencies.

(Node and npm are required.)

Commands

A few useful commands are configured in npm:

# Start the development server
npm start

# If the development server does not detect file changes, try starting as root
sudo npm start

# Lint your code
npm run lint

# Lint and fix errors if possible
npm run lint-fix

# Build your project
npm run build

Configuration

In many situations, development and production environments require different configurations. With Webpack Resolve, this can be handled easily. There are two configuration files, config.js and config.prod.js, which you can adjust to your needs.

In your code, require('config') or import * as config from 'config', which will automatically resolve to config.js when using the development server and to config.prod.js when building your project.

Acknowledgments

Many thanks go to Moritz Schneider, who created the initial configuration for webpack.

no-framework-webpack-boilerplate's People

Contributors

lrenhrda avatar moschn avatar notspecial avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.