<script>
document.querySelectorAll('[wm-folder]').forEach(folder => {
folder.onclick = function(e){
console.log('teste')
}
})
</script>
<h1>Projeto</h1>
<ul>
<li>
<span wm-folder>beckend</span>
<ul>
<li>
<span wm-folder>app</span>
<ul>
<li>produto.js</li>
<li>usuario.js</li>
<li>venda.js</li>
</ul>
</li>
<li>
<span wm-folder>config</span>
<ul>
<li>banco.js</li>
<li>rotas.js</li>
<li>servidor.js</li>
</ul>
</li>
</ul>
</li>
<li>
<span wm-folder>frontend</span>
<ul>
<li>
<span wm-folder>public</span>
<ul>
<li>app.css</li>
<li>app.jss</li>
<li>index.html</li>
</ul>
</li>
</ul>
</li>
</ul>