elm-example-publisher icon indicating copy to clipboard operation
elm-example-publisher copied to clipboard

I can't get your program to work.

Open Orasund opened this issue 6 years ago • 4 comments

I can't get your program to work. Here are the steps i tryed:

  1. I have a docs and a examples folder.
  2. 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)
  3. I compile all example using elm make from the example folder.
  4. I go out of the example folder and run elm-example-publisher examples docs. It returns Succesfully generated docs\index.html.
  5. 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?

Orasund avatar Jan 14 '19 10:01 Orasund

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.

gampleman avatar Jan 16 '19 10:01 gampleman

Thanks for your response, but your suggestion did not work. Its still the same as before. ☹

Orasund avatar Jan 16 '19 21:01 Orasund

It seems like it's not finding the examples for some reason. Do you have the examples on GitHub?

gampleman avatar Jan 17 '19 10:01 gampleman

Yes, Orasund/pixelEngine

Im not quite sure what im doing wrong. I had expected that at least the single-file examples would work.

Orasund avatar Jan 17 '19 10:01 Orasund