import-html-entry
import html and get the exports of entry
Last updated 5 years ago by kuitos .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install import-html-entry 
SYNC missed versions from official npm registry.

import-html-entry

Treats the index html as manifest and loads the assets(css,js), and get the entry script exports.

<!-- subApp/index.html -->

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>test</title>
</head>
<body>

<!-- mark the entry script with entry attribute -->
<script src="https://unpkg.com/mobx@5.0.3/lib/mobx.umd.js" entry></script>
<script src="https://unpkg.com/react@16.4.2/umd/react.production.min.js"></script>
</body>
</html>
import importHTML from 'import-html-entry';

importHTML('./subApp/index.html')
    .then(res => {
        console.log(res.template);

        res.execScripts().then(exports => {
            const mobx = exports;
            const { observable } = mobx;
            observable({
                name: 'kuitos'
            })	
        })
});

Current Tags

  • 1.17.0                                ...           latest (5 months ago)
  • 1.6.0-2                                ...           next (5 years ago)

93 Versions

  • 1.17.0                                ...           5 months ago
  • 1.16.0                                ...           5 months ago
  • 1.15.2                                ...           a year ago
  • 1.15.1                                ...           a year ago
  • 1.15.0                                ...           a year ago
  • 1.14.6                                ...           2 years ago
  • 1.14.5                                ...           2 years ago
  • 1.14.4                                ...           2 years ago
  • 1.14.3                                ...           2 years ago
  • 1.14.2                                ...           2 years ago
  • 1.14.1                                ...           2 years ago
  • 1.14.0                                ...           2 years ago
  • 1.13.0                                ...           2 years ago
  • 1.12.0                                ...           3 years ago
  • 1.11.1                                ...           4 years ago
  • 1.11.0                                ...           4 years ago
  • 1.10.0                                ...           4 years ago
  • 1.9.3                                ...           4 years ago
  • 1.9.2                                ...           4 years ago
  • 1.9.1                                ...           4 years ago
  • 1.9.0                                ...           4 years ago
  • 1.8.1                                ...           4 years ago
  • 1.8.0                                ...           4 years ago
  • 1.7.5                                ...           4 years ago
  • 1.7.4                                ...           4 years ago
  • 1.7.3                                ...           5 years ago
  • 1.7.2                                ...           5 years ago
  • 1.7.1                                ...           5 years ago
  • 1.7.0                                ...           5 years ago
  • 1.6.0                                ...           5 years ago
  • 1.6.0-2                                ...           5 years ago
  • 1.6.0-1                                ...           5 years ago
  • 1.6.0-0                                ...           5 years ago
  • 1.5.1                                ...           5 years ago
  • 1.5.0                                ...           5 years ago
  • 1.4.1                                ...           5 years ago
  • 1.4.0                                ...           5 years ago
  • 1.3.10                                ...           5 years ago
  • 1.3.9                                ...           5 years ago
  • 1.3.8                                ...           5 years ago
  • 1.3.7                                ...           5 years ago
  • 1.3.6                                ...           5 years ago
  • 1.3.5                                ...           5 years ago
  • 1.3.4                                ...           5 years ago
  • 1.3.3                                ...           5 years ago
  • 1.3.2                                ...           5 years ago
  • 1.3.1                                ...           5 years ago
  • 1.3.0                                ...           5 years ago
  • 1.2.6                                ...           5 years ago
  • 1.2.5                                ...           5 years ago
  • 1.2.4                                ...           5 years ago
  • 1.2.3                                ...           5 years ago
  • 1.2.2                                ...           5 years ago
  • 1.2.1                                ...           5 years ago
  • 1.2.0                                ...           5 years ago
  • 1.0.1                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
  • 0.4.12                                ...           5 years ago
  • 0.4.11                                ...           6 years ago
  • 0.4.10                                ...           6 years ago
  • 0.4.9                                ...           6 years ago
  • 0.4.8                                ...           6 years ago
  • 0.4.7                                ...           6 years ago
  • 0.4.6                                ...           6 years ago
  • 0.4.5                                ...           6 years ago
  • 0.4.4                                ...           6 years ago
  • 0.4.3                                ...           6 years ago
  • 0.4.2                                ...           6 years ago
  • 0.4.1                                ...           6 years ago
  • 0.4.0                                ...           6 years ago
  • 0.3.1                                ...           6 years ago
  • 0.2.5                                ...           6 years ago
  • 0.2.4                                ...           6 years ago
  • 0.2.3                                ...           6 years ago
  • 0.2.2                                ...           6 years ago
  • 0.2.1                                ...           6 years ago
  • 0.2.0                                ...           6 years ago
  • 0.1.13                                ...           6 years ago
  • 0.1.12                                ...           6 years ago
  • 0.1.11                                ...           6 years ago
  • 0.1.10                                ...           6 years ago
  • 0.1.9                                ...           6 years ago
  • 0.1.8                                ...           6 years ago
  • 0.1.6                                ...           6 years ago
  • 0.1.5                                ...           6 years ago
  • 0.1.4                                ...           6 years ago
  • 0.1.3                                ...           6 years ago
  • 0.1.2                                ...           6 years ago
  • 0.1.1                                ...           6 years ago
  • 0.1.0                                ...           6 years ago
  • 0.0.3                                ...           6 years ago
  • 0.0.2                                ...           6 years ago
  • 0.0.1                                ...           6 years ago
Maintainers (1)
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (11)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE