Giter Club home page Giter Club logo

webpack-boilerplate's Introduction

TypeSass - Webpack Boilerplate

A simple webpack boilerplate with Typescripts & Sass (save time with this boilerplate πŸšΆβ€β™‚οΈ)

Building and running on localhost

Install node modules

First install dependencies:

npm install

Development

To create a development build:

npm run start

Production

To create a production build:

npm run build

Sass Folder structure

Base

The base folder holds boilerplate content. It holds the styles every page of your site/project should receive.

Components

The components folder holds all your micro layout files. Your styles for buttons and navigation and similar page components.

Layout

Your macro layout files go in the layouts folder. Styles for major sections of the layout like a header or footer and styles for a grid system would belong here.

Pages

If you have styles specific to individual pages on your site, you can place them in the pages folder. For example it’s not uncommon for the home page of your site to require page specific styles that no other page receives.

Vendor

Finally the vendors folder holds 3rd party code and the main.scss file uses @import statements to include the other files.

Generating Multiple HTML Files

To generate more than one HTML file, declare the plugin more than once in your plugins array

webpack.config.js

{
  plugins: [
    new HtmlWebpackPlugin({  // Also generate a demo.html
      filename: 'demo.html',
      template: 'src/html/demo.html'
    })
  ]
}

webpack-boilerplate's People

Contributors

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