Giter VIP home page Giter VIP logo

create-html5-boilerplate's Introduction

Create HTML5 Boilerplate

Quick start for HTML5 Boilerplate. Get up and running with one command.

Getting Started

You can get started using one of three options- npx, npm init, or yarn create Using npx

npx create-html5-boilerplate new-site
cd new-site
npm install
npm start

Using npm init

npm init html5-boilerplate new-site
cd new-site
npm install
npm start

Using yarn

yarn create html5-boilerplate new-site
cd new-site
yarn install
yarn start

These commands are equivalent and do the following:

  1. Download and install the latest version of HTML5 Boilerplate
  2. Installs dependencies
  3. Bundles site assets and start a web server using Parcel
  4. Opens a web browser pointed to http://localhost:1234/

Requirements

create-html5-boilerplate is cross-platform. It works wherever node and npm work. The only requirements are for npx, which requires npm version 5.2 or greater and npm init which requires an npm version greater than 6.0. If you're stuck on an older version of npm you can still use create-html5-boilerplate by running the following command to install the project globally.

npm install -g create-html5-boilerplate

Then you can use create-html5-boilerplate as in the following example

create-html5-boilerplate new-site
cd new-site
npm install
npm start

Installing Specific Versions

You can also install a specific version:

npx create-html5-boilerplate new-site --release=7.2.0
cd new-site
npm install
npm start

CONTRIBUTING

Setting Up a Local Copy

  1. Clone the repo with git clone https://github.com/h5bp/create-html5-boilerplate.git
  2. Run npm install in the root create-html5-boilerplate folder.
  3. Run npm link to make npm run local copy instead of downloading from registry
  4. Now you can use npm init html5-boilerplate and npx create-html5-boilerplate

note: you can use npx create-html5-boilerplate ./out/example from create-html5-boilerplate without running npm link also its possible to run directly NodeJS entry point node index.js ./out/example or npm start ./out is git ignored folder, so you should use this folder for tests.

If you want to try out the end-to-end flow with the global CLI, you can do this too:

npx create-html5-boilerplate ./out/new-site
cd new-site
npm install
npm start

Tests

Tests are written using jest and located in tests/test.js run npm test

run coverage reports npm run coverage

create-html5-boilerplate's People

Contributors

coliff avatar dependabot[bot] avatar roblarsen avatar smurfpandey avatar vltansky avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

create-html5-boilerplate's Issues

Document Development Process

@vltansky Can you write up how to develop this? I'm going to try to enlist some help testing it since I just ran into some issues testing it myself and if people decide they want to help fix stuff I'd like to be able to point them in the right direction. We can add a new section to the Readme.

GitHub Actions set to run on the wrong branch

I'm submitting a ...

  • bug report
  • feature request
  • other (Please do not submit support requests here (below))

GitHub Actions are set to run on Master branch. They all need to be updated to run on Main.

Tests

I'll write few tests today/tomorrow using jest. Will make pull requests.
Things to test:

  • temp folder deleted after copy

  • target folder is created

  • target folder contains files (maybe to check index.html, css, package.json)

  • version downloading feature works

  • version downloading works both with 'v' and without (-r=7.2.0 | v7.2.0 | 7.2)

  • version alias works

  • wrong version outputs error

  • create coverage using Istanbul (included in jest) and upload to converage.io via github actions

Did I miss something?

Update `package-lock.json`

I'm submitting a ...

  • bug report
  • feature request
  • other (Please do not submit support requests here (below))

The package-lock.json file was created with an old version of npm. Should fix that (update to lockfile version v2).

Make it easier to remove Google Analytics

I'm submitting a ...

  • feature request

Notes

It seems a little crude to have to remove Google Analytics 'snippets' from various pages prior to using this boilerplate. As someone who wishes to avoid Google Analytics, I feel like I'm fighting against the template. Please consider an easy flag / import to disable this.

Release 0.2.0

I'm happy to release early and often with this as we add more features. I'd like to release 0.2.0. This issue will track those activities.

Node tries to open index.js, doesn't run it when running npx create...

@vltansky I'm not sure how I ended up here, but in testing this I've seen two bugs. The first is that the folder argument doesn't seem to work, although I can no longer test that as on two machines running any variation of the npx command opens index.js (in whatever app is associated with js files) and doesn't execute it. I'm going to try to enlist some people to test this, but I'd at least like to understand how I got here before I open the floodgates.

Testing prompts

I cannot find a way how to write tests for prompts.
Would be happy if somebody can help with this.

Publish html5-boilerplate to npm

Looks like last time it was published 3 years ago. Its still parcel 1 there, although i can see its replaces by webpack.
As a result create-html5-boilerplate downloads old version

CodeQL GitHub Action issue

I'm submitting a ...

  • bug report
  • feature request
  • other (Please do not submit support requests here (below))

image

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.