• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

dmnsgn/frontend-boilerplate: An ES20XX starter with common frontend tasks using ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

dmnsgn/frontend-boilerplate

开源软件地址:

https://github.com/dmnsgn/frontend-boilerplate

开源编程语言:

JavaScript 88.8%

开源软件介绍:

frontend-boilerplate

dependencies repo size version Conventional Commits styled with prettier linted with eslint license

An ES20XX starter with common frontend tasks using Webpack 5 as module bundler and npm scripts as task runner.

paypal coinbase twitter

If you serve your files over HTTPS with HTTP/2, use compression (gzip, brotli...) for text-based resources, and respect accessibility rules, your lighthouse score will be 100%.

Setup

Requirements

Node ">=15.0.0" (use brew or install it from here)

brew install node

Clone the repository

OSX & Linux:

git clone --depth 1 https://github.com/dmnsgn/frontend-boilerplate.git && cd frontend-boilerplate && rm -rf .git && git init

Windows:

git clone --depth 1 https://github.com/dmnsgn/frontend-boilerplate.git && cd frontend-boilerplate && rd /s /q .git && git init

Dependencies

npm install

Configuration

Open config/config.js:

Key Description Type
PATHS map of paths to the different folders needed by webpack and npm scripts Map
BROWSERS the browsers targeted for babel-preset-env and browserslist (see full list here) Array

Open package.json:

Key Description Type
config.title title used for metas and favicons String
config.url absolute url used for metas, robotstxt, sitemap and banner String
config.lang language for index.html and favicons String
config.description title used for metas, favicons and banner String
config.imageWidth width of the share image (default ${PACKAGE.config.url}/share.jpg) String
config.imageHeight height of the share image (default ${PACKAGE.config.url}/share.jpg) String
config.type Open Graph type String
config.card Twitter card String
config.copyright license acronym used for banner String
config.handle twitter handle for metas String
config.analyticsUA google analytics UA String
config.pages list of pages with id and optional name, description, EJS template for HtmlWebpackPlugin Array
author.name author name used for favicons String
author.url author url used for favicons String

Develop

npm run dev
// or npm start

Production

npm run prod
// or npm run build

Features

Webpack loaders

Webpack plugins

npm scripts

  • npm run clean: remove all the files from the dist directory
  • npm run favicons: generate favicons files and /src/templates/_favicons.ejs
  • npm run robotstxt: generate robots.txt file
  • npm run sitemap: generate sitemap.xml file

Prettier formatter

Licence

MIT




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
phodal/fe: 《我的职业是前端工程师》 - Ebook:I'm a FrontEnd Developer ...发布时间:2022-06-07
下一篇:
krddevdays/frontend发布时间:2022-06-07
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap