Closed VictorChen closed 3 years ago
Interesting. I'll think about it.
I would like to second this. It will be super helpful.
Yes, it would be so helpful! Currently I am having hard time to build (watch) the library and serve the demo (sample) in the same time.
@VictorChen @dermatobia @mudin I just updated this starter to use the latest babel and webpack. There is also support of TypeScript and Mocha is replaced with Jest as a test runner. I've also added a simple index.html
that consumes the exported library. You can see it here https://github.com/krasimir/webpack-library-starter/blob/master/lib/index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
</head>
<body>
<script src="./webpack-library-starter.js"></script>
<!-- <script src="./webpack-library-starter.min.js"></script> -->
<script>
window.addEventListener("load", () => {
const dog = new window["webpack-library-starter"].Dog();
console.log(dog.name);
});
</script>
</body>
</html>
any chance this can include a simple demo page where you can display the components of your library? Will also help a lot while iterating on the library (gives you a place to test)