- Notifications
You must be signed in to change notification settings - Fork49
npx quick start for html5-boilerplate
License
h5bp/create-html5-boilerplate
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Quick start for HTML5 Boilerplate. Get up and running with one command.
You can get started using one of three options-npx
,npm init
, oryarn create
Using
npx
npx create-html5-boilerplate new-sitecd new-sitenpm installnpm start
Usingnpm init
npm init html5-boilerplate new-sitecd new-sitenpm installnpm start
Using yarn
yarn create html5-boilerplate new-sitecd new-siteyarn installyarn start
These commands are equivalent and do the following:
- Download and install the latest version of HTML5 Boilerplate
- Installs dependencies
- Bundles site assets and start a web server usingParcel
- Opens a web browser pointed tohttp://localhost:1234/
create-html5-boilerplate
is cross-platform. It works wherever node and npm work.The only requirements are fornpx
, which requires npm version 5.2 or greater andnpm init
which requires an npm version greater than 6.0. If you're stuck on anolder version of npm you can still usecreate-html5-boilerplate
by running thefollowing command to install the project globally.
npm install -g create-html5-boilerplate
Then you can usecreate-html5-boilerplate
as in the following example
create-html5-boilerplate new-sitecd new-sitenpm installnpm start
You can also install a specific version:
npx create-html5-boilerplate new-site --release=7.2.0cd new-sitenpm installnpm start
- Clone the repo with
git clone https://github.com/h5bp/create-html5-boilerplate.git
- Run
npm install
in the rootcreate-html5-boilerplate
folder. - Run
npm link
to make npm run local copy instead of downloading from registry - Now you can use
npm init html5-boilerplate
andnpx create-html5-boilerplate
note: you can usenpx create-html5-boilerplate ./out/example
fromcreate-html5-boilerplate
without runningnpm link
also its possible to run directly NodeJS entry pointnode index.js ./out/example
ornpm 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-sitecd new-sitenpm installnpm start
Tests are written usingjest and located intests/test.js
runnpm test
run coverage reportsnpm run coverage
About
npx quick start for html5-boilerplate