简体   繁体   English

如何将多个CSS文件和JavaScript文件编译为一个文件?

[英]How do I compile multiple css files and javascript files into one file?

I'm going through a wordpress theme building tutorial and was given a folder, https://github.com/t-hoff-94/university-static , with a JavaScript folder and a CSS folder, and also a 'bundled' file for each type that I am linking to for the actual project. 我正在阅读wordpress主题构建教程,并获得了一个文件夹https://github.com/t-hoff-94/university-static ,其中包含一个JavaScript文件夹和一个CSS文件夹,以及一个“捆绑”文件对于我为实际项目链接的每种类型。 I am trying to figure out how they compiled the code so I don't have to modify the bundled file and I can replicate the set-up. 我试图弄清楚他们是如何编译代码的,所以我不必修改捆绑的文件,并且可以复制设置。 All I want is to be able to have multiple files to organize code, and I am curious how they imported "3rd party packages". 我所希望的是能够有多个文件来组织代码,我很好奇它们是如何导入“第三方软件包”的。

I have searched for ways to do this with webpack but most of it seemed to be injecting the css into a JavaScript file, or the style tag in the heading. 我已经搜索了使用webpack做到这一点的方法,但是大多数方法似乎是将css注入JavaScript文件或标题中的style标签。

It looks like there were using webpack according to this file for example. 例如,似乎根据该文件正在使用webpack But the whole thing is missing the actual config. 但是整个事情都缺少实际的配置。

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

相关问题 如何根据变量将.scss文件编译成多个.css文件 - How do I compile my .scss file into multiple .css files depending on the variables 如何将一个 CSS 文件作为样式表连接到博客类型网站不同位置的多个 PHP 文件? - How do I connect one CSS file as a stylesheet to multiple PHP files in different places for a blog type website? 如何使用两个CSS文件设置一个HTML文件的样式? - How do I style one HTML file with two CSS files? 包括CSS文件和Javascript文件的加载-如何进行优化 - Including loads of css files and Javascript file - how do I optimize 如何将一个包含较少css文件的目录编译为css? - How do I compile a directory full of less css files to css? 将多个SCSS文件导入一个SCSS文件,编译成一个CSS文件 - Import multiple SCSS files into one SCSS file and compile to one CSS file 多个CSS文件或一个大CSS文件? - Multiple css files or one big css file? 尝试将sass / scss文件编译为css文件(一对一) - Trying to compile sass/scss file into css files (one to one) (SASS)如何排除导入的文件以编译为CSS文件 - (SASS) How do I exclude my imported files to compile to css files 如何使用 Laravel Mix 将多个 CSS 文件编译成两个 CSS 文件 output 基于不同布局中所需的每个文件 - How to compile multiple CSS files into two CSS files output based on each one required in different layout using Laravel Mix
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM