Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/424.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何连接文件以创建组件(HTML/CSS/JS)_Javascript_Html_Css_Components_Workflow - Fatal编程技术网

Javascript 如何连接文件以创建组件(HTML/CSS/JS)

Javascript 如何连接文件以创建组件(HTML/CSS/JS),javascript,html,css,components,workflow,Javascript,Html,Css,Components,Workflow,我正在开发一个基于原子设计的工作流。它还是静止的。 我创建了包含组件的文件夹,其结构如下: /components /atoms - button.css - button.hmtl - button.js /molecules - header.css - header.hmtl - header.js /organisms /templates 我想构建组件。 因此,我想创建模板,并仅使用html/css/js作为每个页面中的元素。 不需要使用整

我正在开发一个基于原子设计的工作流。它还是静止的。 我创建了包含组件的文件夹,其结构如下:

/components
 /atoms
   - button.css
   - button.hmtl
   - button.js
 /molecules
   - header.css
   - header.hmtl
   - header.js
 /organisms
 /templates
我想构建组件。 因此,我想创建模板,并仅使用html/css/js作为每个页面中的元素。 不需要使用整个应用程序代码

如何将每个元素的css/html/js连接到单个文件中的一个文件中? 每个文件一个,html、css、js
我可以用gulp吗?

如果它只是一个文件中需要的CSS,那么您的直觉是正确的,它可能是最简单的解决方案。我建议使用专门为此目的设计的组件。

实际上,我想构建组件。因此,我想创建模板,并仅使用html/css/js作为每个页面中的元素。不需要使用整个应用程序代码。