Giter VIP home page Giter VIP logo

parcel-html-sass-js-starter-template's Introduction

Parcel HTML, SASS, and JavaScript Starter Template

A blazing fast frontend development starter template, bundled using Parcel.

Quick Start

To get started instantly, you can one-click deploy to Netlify below (this also creates a copy of the repository in your own GitHub account), or you can click the "Use this Template" above.

Deploy to Netlify

Features

HTML5 partials with posthtml‑include

Split your HTML pages into smaller, more manageable files with PostHTML's Include plugin for Parcel.

<!-- index.html -->
<html>
  <head>
    <title>index.html</title>
  </head>
  <body>
    <include
      src="partials/header.html"
      locals='{
        "title": "Hello World"
      }'
    ></include>
  </body>
</html>
<!-- partials/header.html -->
<header>
  <h1>{{ title }}</h1>
</header>

Modern ES6 JavaScript

Use modern JavaScript syntax and features like ES6 imports without the need for additional configuration.

// index.js
import helloWorld from "./scripts/helloWorld";

helloWorld();
// scripts/helloWorld.js

const helloWorld = () => {
  console.log("Hello world 👋");
};

export default helloWorld;

SASS

Use the CSS pre-processor SASS to split your CSS into separate files and use other features like variables and mixins. Check out the Parcel docs if you're interested in using another pre- or post-processor such as PostCSS, LESS, or Stylus. Or, have a look at this same starter template using vanilla CSS if you'd prefer.

// styles.scss
$link-color: #ff526f;
$link-darkened-color: #ad001d;

a {
  color: $link-color;

  &:hover {
    color: $link-darkened-color;
  }
}

How to run

Prerequisites: You'll need Node and NPM installed on your local computer.

Run

npm install

to install dependencies, then

npm start

to start the local development server.

To build for production, run

npm run build

parcel-html-sass-js-starter-template's People

Contributors

aileen-r avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

parcel-html-sass-js-starter-template's Issues

Distribution with existing folder structure

Hello Aileen,

Thank you for the great starter template. It makes getting started with Parcel much easier.

However, I am getting desperate with the following requirement:
I would like to build the same folder structure (with assets, js, css) in the dist folder as in the src folder, but I just can't get it to work.
I have already done a lot of research and tried out various tips and plug-ins, but have not found a working solution.
Do you have a working solution for this?
I'm always surprised that this isn't a standard in parcel, because I don't work on a project where the sources should all be in the same folder.
Thank you very much.

Kind regards
Martin

How can I use few html pages

Hello =) I use your template, but I have a problem. How can I create a few html pages ?
excample:
index.html
second-page.html
another-page.html

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.