Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I can't get your program to work. #2

Open
Orasund opened this issue Jan 14, 2019 · 4 comments
Open

I can't get your program to work. #2

Orasund opened this issue Jan 14, 2019 · 4 comments

Comments

@Orasund
Copy link

Orasund commented Jan 14, 2019

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?

@gampleman
Copy link
Owner

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.

@Orasund
Copy link
Author

Orasund commented Jan 16, 2019

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

@gampleman
Copy link
Owner

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

@Orasund
Copy link
Author

Orasund commented Jan 17, 2019

Yes, Orasund/pixelEngine

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants