static-html-webpack-boilerplate

授权协议 MIT License
开发语言 JavaScript
所属分类 Web应用开发、 常用JavaScript包
软件类型 开源软件
地区 不详
投 递 者 魏宸
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

�� Static HTML Webpack Boilerplate

Enjoy hand-writing your HTML? Keep it old-school with modern build tools. This boilerplate setup makes it easier to write your own styling, scripts, and mark-up.

Features

  • Write SCSS and modern JavaScript code in src and build minified, transpiled code for production in dist
  • Continuous integration with linting tests and deploying to gh-pages
  • Live reloading with webpack-dev-server
  • ES6+ to ES5 transpilation, bundling, and minification
  • SCSS to CSS transpilation, bundling, autoprefixing, and minification
  • Automatic copying of HTML and static assets from src to dist folders
  • Linting for styles and scripts

�� Usage

  • Use this template on GitHub or download the latest release from the Releases page.
  • Write all your ES2015+ Javascript code in src/js and SCSS styling in src/style. Store static assets in src/static. Organize HTML files the way you like.
  • Available commands:
    • npm run build: Build files to the dist folder. Transpiles down to ES5 and bundles all JS into app.bundle.js. Transpiles SCSS to CSS and adds prefixing into style.bundle.css. Copies static assets and HTML over, and bundled CSS and JS gets added to HTML file.
    • npm run start:dev: Run webpack-dev-server at localhost:9000. Includes live reloading on any Javascript/SCSS/HTML changes.
    • npm run start: Builds files and runs a local production server on localhost:8080 with http-server.
    • npm run run lint:js: Lints JS with ESLint.
    • npm run lint:styles: Lints SCSS stylesheets with stylelint.
    • npm run lint:html: Lints HTML for a11y issues using pa11y.

�� Continuous Integration

This boilerplate contains integration with Travis CI. The build system runs all linting scripts and deploys to GitHub pages upon push to the master branch. However, note that this deployment flow only works for Project Pages, as User and Organization pages only support the master branch flow.

For more information on how to set up alternative deployment processes, check out the Travis CI documentation on deployment. The service can deploy to dozens of cloud providers, including Heroku, AWS, and Firebase.

  • vue-webpack-boilerplate是vue-cli脚手架的一个项目模板。github地址 使用 $ npm install -g vue-cli $ vue init webpack my-project $ cd my-project $ npm install $ npm run dev 文件解析 .gitignore .gitignore用于告诉Git系统要忽略掉哪些文件。 在使

 相关资料
  • Static html pages with Webpack 5 > PREVIEW LIVE This is a forkable example of a static website (plain html/css/javascript)assembled with webpack. You could also use this repository as a template when

  • HTML Webpack Plugin Plugin that simplifies creation of HTML files to serve your bundles Install Webpack 5 npm i --save-dev html-webpack-plugin yarn add --dev html-webpack-plugin Webpack 4 npm i

  • 我有一个项目,使用Twig模板。它中的所有数据都是静态的,但为了清晰起见,我在其他twig文件中分离了页面的部分(否则一个文件中会有数百行标记)。 views/welcome/hello.html 现在我想做的是使用webpack捆绑任何js、css,并使用HTML webpack插件创建HTML页面,并将这些样式和脚本注入: 在我的dist/index.html中,我希望得到这样的结果,生成的h

  • 问题内容: 我正在尝试使用Webpack设置一个有角度的项目,但是我不知道如何从html模板中引用图像并将其包含在构建中。 我的项目树如下: 我正在尝试与和一起使用,但这只是没有发生。 这是一个示例模板: 问题#1 :我希望能够参考相对于的图片。现在,路径需要相对于模板文件,这将变得非常丑陋()。 问题2 :即使我指定了相对路径(如我上面所做的那样),项目也可以成功构建,但实际上没有任何反应。路径

  • 描述: 记录一个静态成员。 概述 @static标签标明一个在父类中的标识符不需实例即可使用。 使用@static标签将重写标识符的默认作用域,但有一个例外:在全局作用域下的标识符将保持他的全局性。 例子 下面的例子可以写成 "@function MyNamespace.myFunction" 并省略@memberof和@static标签,他们的效果是一样的: 例如,在一个虚拟注释中使用@stat

  • Static Site Boilerplate   Discuss it on Product Hunt �� Homepage: http://staticsiteboilerplate.com/ Documentation: https://docs.staticsiteboilerplate.com/ Installation git clone https://github.com/eri