Skip to content

Smarty plugin that Improves JS embedding with front-end performance in mind

Notifications You must be signed in to change notification settings

pjparra/smarty-jsEmbed

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Smarty plugin jsEmbed

A simple smarty plugin to improve front-end performance by embedding in-page JS rather than in an external file when the file is too small.

Usage:

{jsEmbed src="/js/main.js" threshold="15000"}

The threshold optional, with a default value of 10000. If the file weights less than "threshold" bytes, then it will be embedded in-page. If it weights more, the file is left external.

Particularly efficient when used along with assetic-smarty

About

Smarty plugin that Improves JS embedding with front-end performance in mind

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages