elm-example-publisher
elm-example-publisher copied to clipboard
I can't get your program to work.
I can't get your program to work. Here are the steps i tryed:
- I have a
docs
and aexamples
folder. - I put my examples in the example folder, together with a "application"-elm.json (the dependencies are the same as from the "package"-elm.json)
- I compile all example using
elm make
from the example folder. - I go out of the example folder and run
elm-example-publisher examples docs
. It returnsSuccesfully generated docs\index.html
. - Now I have two files in the
docs
folder:
index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Examples</title>
<style media="screen">
body {
font-family: Helvetica, sans-serif;
display: flex
}
.lead,
h1 {
margin-left: 20px
}
ul {
list-style-type: none;
padding: 0
}
li {
border: 1px solid #000;
float: left;
width: 330px;
margin: 20px;
padding: 10px 10px 0 10px
}
</style>
</head>
<body>
<main>
<h1>Examples</h1>
<p class="lead">My package examples</p>
<ul></ul>
</main>
</body>
</html>
service-worker.js
/**
* Welcome to your Workbox-powered service worker!
*
* You'll need to register this file in your web app and you should
* disable HTTP caching for this file too.
* See https://goo.gl/nhQhGp
*
* The rest of the code is auto-generated. Please don't update this file
* directly; instead, make changes to your Workbox build configuration
* and re-run your build process.
* See https://goo.gl/2aRDsh
*/
importScripts("https://storage.googleapis.com/workbox-cdn/releases/3.6.2/workbox-sw.js");
/**
* The workboxSW.precacheAndRoute() method efficiently caches and responds to
* requests for URLs in the manifest.
* See https://goo.gl/S9QRab
*/
self.__precacheManifest = [].concat(self.__precacheManifest || []);
workbox.precaching.suppressWarnings();
workbox.precaching.precacheAndRoute(self.__precacheManifest, {});
What am I doing wrong?
Sorry the documentation is fairly misleading at the moment. You need to cd into the examples directory and run elm-example-publisher . ../docs
.
Also note that the example elm modules have to explicitly expose main
for this to work.
Thanks for your response, but your suggestion did not work. Its still the same as before. ☹
It seems like it's not finding the examples for some reason. Do you have the examples on GitHub?
Yes, Orasund/pixelEngine
Im not quite sure what im doing wrong. I had expected that at least the single-file examples would work.