Skip to content

stcjs/stc-moveto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

stc-moveto

dependencies Status devDependencies Status

Install

npm install stc-moveto

How to use

const csslint = require('stc-moveto')

stc.workflow({
  moveto: {plugin: moveto, include: {type: 'tpl'}}
})

<script stc-moveto="head"  src="xxx"></script>
<link stc-moveto="head">
<style stc-moveto="tail"></style>

规则

  • head 将移动到 </head> 处
  • tail 将移动到 </body> 处
  • 同样的外链资源 url 将会只插入第一个插入点,其余过滤
  • css 永远比 js 靠前
  • 如果页面没有 </head> , </body> 标签,将不做处理
  • stc-moveto, moveto, moveTo, move-to 等写法均可,推荐 stc-moveto
  • 更多特性参见 demo 编译结果