mirror of
https://github.com/tengge1/ShadowEditor.git
synced 2026-01-25 15:08:11 +00:00
30 lines
694 B
HTML
30 lines
694 B
HTML
<!DOCTYPE html>
|
|
|
|
<html lang="zh-cn">
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>03 RequireTest</title>
|
|
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
|
|
<script src="../dist/Shadow.PackageManager.js"></script>
|
|
</head>
|
|
|
|
<body>
|
|
<div>Hello, world!</div>
|
|
<script>
|
|
var pm = new Shadow.PackageManager();
|
|
pm.setPath('./packages');
|
|
pm.require([
|
|
'MyCss.css',
|
|
'ModuleA.js',
|
|
'ModuleB.js'
|
|
]).then(() => {
|
|
alert(moduleNameA);
|
|
alert(moduleNameB);
|
|
FunctionA();
|
|
FunctionB();
|
|
});
|
|
</script>
|
|
</body>
|
|
|
|
</html> |