简体   繁体   English

用于构建自动化的Web UI管道

[英]Web UI Pipeline for build automation

I am using Node and Gulp with some modules to create a UI pipeline, but I want to know if there are some less complex solutions. 我将Node和Gulp与某些模块一起使用来创建UI管道,但是我想知道是否有一些不太复杂的解决方案。 My web application is a collection of html pages, of course. 当然,我的Web应用程序是html页面的集合。 They all have the same header, footer, and navigation. 它们都有相同的页眉,页脚和导航。 They all have two common JS and CSS files (libraries). 它们都有两个常见的JS和CSS文件(库)。 However, the content itself is of course different. 但是,内容本身当然是不同的。

Are there any services to build a UI pipeline (like Gulp) that will take common HTML files and other resources as well as specific page resources (html/css/js) and create a single page app out of them? 是否有用于构建UI管道(如Gulp)的服务,这些管道将使用常见的HTML文件和其他资源以及特定的页面资源(html / css / js)并从中创建一个页面应用程序? Or is using Gulp to pull and concat files the best way.. 或者是使用Gulp提取和合并文件的最佳方法。

The reason I ask is because it is cumbersome to inject the CSS and JS files into the <header></header> tag without having tiny HTML files to also inject, that consists of nothing other than a closing <tag> 我问的原因是因为将CSS和JS文件注入到<header></header>标记中而又没有微小的HTML文件也很麻烦,除了封闭的<tag>

Thanks. 谢谢。

When I understand you right, you inject CSS and JS files and concat it after with other html files to get the closing tags? 当我理解正确时,您注入CSS和JS文件,然后与其他html文件合并以获取结束标记?

Think you need just this plugin: gulp-inject . 认为您只需要这个插件: gulp-inject Which will inject the files on right place. 这会将文件注入正确的位置。

Gulp is not a tool to create single page apps. Gulp不是创建单页应用程序的工具。 It's an automatisation and build tool. 这是一个自动化和构建工具。 To create a single page app you will need something like Angular/Ember/Aurelia/React or an other JS framework. 要创建一个单页应用程序,您需要使用Angular / Ember / Aurelia / React或其他JS框架。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM