镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content
This repository was archived by the owner on Nov 9, 2017. It is now read-only.
pirxpilotPublic archive

About

Plugin for component build: appends require('boot') to the output script

Resources

Stars

7 stars

Watchers

2 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

component-autoboot

Plugin for component build: automatically requires boot module at the end of the output script.

Install

npm install component-autoboot

Usage

If have just one script in your application or a webpage (and there is precious few reasons to have more than one if you use component properly) you may catch yourself adding this snippet to HTML

<script src="/build/build.min.js" />
<script>require('boot');</script>

This tiny plugin provides an alternative. Build your sources like this:

component build --use component-autoboot

And require("boot"); line is appended to your script. You can now load it and execute it in one shot.

<script src="/build/build.min.js" defer />

License

MIT

About

Plugin for component build: appends require('boot') to the output script

Resources

Stars

7 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages