Giter Club home page Giter Club logo

webpack-server's Introduction

Webpack-Server

Español | License


Development server (with webpack)

A simple development server for multi-page site in Html5, JS y CSS. Features:

  • A separete folder configuration for webpack (production and development)

  • It use HtmlWebpackPlugin plugin to define each page, title and activate class for the active item menu.

  • Bootstrap source files. For an easy implementation, the compiled and minified files are used, called in index.js and you can change it.

  • Some declarete rules (into config webpack):

    • Split code js
    • Separate CSS files
    • Sass y Postcss: autoprefixer y cssnano (minify)
    • Loader and optimize files images
    • Loader fonts files
    • Handlebars template

Install

  1. Install Node.js

  2. Clone the webpack-server repository:

      git clone https://github.com/Edurtu/webpack-server.git
  3. Navigate to the webpack-server folder

      cd webpack-server
  4. Install dependencies:

      npm install

Considerations

  • The entry files of our project, is inside src folder

  • The production folder is dist, you can change it in webpack.prod.js. Erase and recreate the production folder, type:

      npm run build
  • It integrate a simple web server and ability to use live reloading with webpack-dev-server module, in webpack.dev.js you can change the configurable options. Run the development server typing:

      npm start

Spanish

Servidor para desarrollo (con Webpack)

Servidor de desarrollo para sitio web multi-página en Html5, JS y CSS. Características:

  • Carpeta de configuración separada en webpack (producción y desarrollo).

  • Uso del plugin HtmlWebpackPlugin para definir cada página, su título y activación de la opción del menú en la navegación

  • Archivos fuente de Bootstrap. Para una implementación fácil se usan los ficheros complilados y minificados, estos son llamados en index.js donde puedes cambiarlo.

  • Algunas reglas declaradas (config webpack):

    • División de módulos js
    • Extracción de css
    • Sass y Postcss: autoprefixer y cssnano (minificación)
    • Lector y optimización de imágenes
    • Lector de fuentes locales
    • Uso del sistema de plantillas Handlebars

Instalación

  1. Instala Node.js

  2. Clona el repositorio webpack-server:

      git clone https://github.com/Edurtu/webpack-server.git
  3. Entra en la carpeta webpack-server

      cd webpack-server
  4. Instala las dependencias:

      npm install

Consideraciones

  • Estructura del proyecto en la carpeta src

  • Carpeta de producción 'generada' dist, configuración en webpack.prod.js

      npm run build
  • Servidor de desarrollo webpack-dev-server, configuración en webpack.dev.js

      npm start

License

License MIT https://opensource.org/licenses/mit-license.php

webpack-server's People

Contributors

edurtu 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.