Skip to content
预加载前端需要的资源,包括图片、CSS、字体
JavaScript HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dist uglify iife moudule Jun 10, 2017
docs
src
test
.babelrc
.gitignore init 2.2.2 Jun 7, 2017
README.md
gulpfile.js uglify iife moudule Jun 10, 2017
package.json up md Jun 10, 2017

README.md

preload

静态资源预加载组件

features

  1. 每个模块均可单独引入
  2. 支持amd、cjs、es、iife、umd多种形式使用
  3. 打包三个模块压缩之后整体大小小于4KB

图片预加载
CSS加载
font加载

install

npm install apreload

usage

可以用ES6 模块的形式引入

import Preload from 'apreload' 

也可以直接使用CommonJS方式引入

var Preload = require('apreload');

或者直接引入到HTML里面也可以

<script src="https://unpkg.com/apreload@2.2.4/dist/iife/preload.js"></script>

dev

git clone https://github.com/jayZOU/preload.git  
cd preload  
npm i  
npm run dev //or npm run build  

change log

2.1.2
2.0.1

You can’t perform that action at this time.