Socket
Socket
Sign inDemoInstall

@w6s/cordova-import

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@w6s/cordova-import

Simple CordovaJs import util.


Version published
Weekly downloads
14
increased by16.67%
Maintainers
1
Weekly downloads
 
Created
Source

@w6s/cordova-import

Simple CordovaJs import util.

如何使用

当前该js的发布地址为//workplus.io/cordova-import.js,可在Release页面进行下载。

单页面应用(SPA)引入一次即可,多页面应用需每个页面都逐个引入

简单地在index.html头部引入即可:

<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta http-equiv="X-UA-Compatible" content="ie=edge">
        <!-- 直接添加即可 -->
        <script src="//workplus.io/cordova-import.js" type="text/javascript"></script>
        
        <title>Cordova Import Demo</title>
    </head>
    <body>
        <div id="app"></div> 
    </body>
</html>

可选参数

当前仅支持传入type类型,可选的值为httplocal,其中http为默认的方式,设置方式如下:

<script src="//workplus.io/cordova-import.js?type=local" type="text/javascript"></script>

注意,如果你的页面将可能在iframe里加载,请勿使用local类型。local类型适合用于对网络性能要求较高的场合。

配置说明

const config = {
    // 【重要】SDK 的地址,必须正确,否则影响脚本注入
    sdkUri: '//workplus.io/cordova-import.js',
    ...

    // 不同平台的 CordovaJs 地址
    cordovaImportUri: {
        iOS: '//workplus.io/ios.cordova.min.js',
        android: '//workplus.io/android.cordova.min.js',
        local: 'applocal://cordova.min.js',
    },
    ...
};

Keywords

FAQs

Package last updated on 27 Nov 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc