Skip to content

Commit

Permalink
Initial starter template.
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonkearns committed Mar 21, 2020
0 parents commit de4e013
Show file tree
Hide file tree
Showing 22 changed files with 14,227 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
node_modules
elm-stuff
sanity/dist
dist
gen/
elm-graphql-gen
.cache/
src/tailwind-compiled.css

6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.cache
package.json
package-lock.json
dist
elm-stuff
elm.json
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"endOfLine": "lf",
"semi": false,
"singleQuote": false,
"tabWidth": 2,
"trailingComma": "es5"
}
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# elm-pages-starter

[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/dillonkearns/elm-pages-tailwind-starter)

This is an example repo to get you up and running with `elm-pages`.

The entrypoint file is `index.js`. That file imports `src/Main.elm`. The `content` folder is turned into your static pages. The rest is mostly determined by logic in the Elm code! Learn more with the resources below.

## Setup Instructions
Click "Use this template" on this Github page to fork the repo.

Or git clone it:

```
git clone [email protected]:dillonkearns/elm-pages-tailwind-starter.git
```

Then install and run the dev server

```
cd elm-pages-tailwind-starter
npm install
npm start # starts a local dev server using `elm-pages develop`
```

From there you can tweak the `content` folder or change the `src/Main.elm` file.


## Learn more about `elm-pages`

- Documentation site: https://elm-pages.com
- [Elm Package docs](https://package.elm-lang.org/packages/dillonkearns/elm-pages/latest/)
- [`elm-pages` blog](https://elm-pages.com/blog)
14 changes: 14 additions & 0 deletions content/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: elm-pages-starter - a simple blog starter
type: page
---

This is an example repo to get you up and running with `elm-pages`.

The entrypoint file is `index.js`. That file imports `src/Main.elm`. The `content` folder is turned into your static pages. The rest is mostly determined by logic in the Elm code! Learn more with the resources below.

## Learn more about `elm-pages`

- Documentation site: https://elm-pages.com
- [Elm Package docs](https://package.elm-lang.org/packages/dillonkearns/elm-pages/latest/)
- [`elm-pages` blog](https://elm-pages.com/blog)
10 changes: 10 additions & 0 deletions elm-analyse.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"excludedPaths" : [
"elm-graphql-gen/",
"gen/"
],
"checks" : {
"ImportAll": false
}
}

64 changes: 64 additions & 0 deletions elm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"type": "application",
"source-directories": [
"src",
"gen"
],
"elm-version": "0.19.1",
"dependencies": {
"direct": {
"avh4/elm-color": "1.0.0",
"dillonkearns/elm-graphql": "5.0.0",
"dillonkearns/elm-pages": "4.0.0",
"dillonkearns/elm-rss": "1.0.0",
"dillonkearns/elm-sitemap": "1.0.0",
"elm/browser": "1.0.2",
"elm/core": "1.0.5",
"elm/html": "1.0.0",
"elm/http": "2.0.0",
"elm/json": "1.1.3",
"elm/parser": "1.1.0",
"elm/svg": "1.0.1",
"elm/time": "1.0.0",
"elm/url": "1.0.0",
"elm-community/dict-extra": "2.4.0",
"elm-community/list-extra": "8.2.3",
"elm-community/result-extra": "2.3.0",
"elm-community/string-extra": "4.0.1",
"elm-explorations/markdown": "1.0.0",
"frandibar/elm-font-awesome-5": "1.0.0",
"justinmimbs/date": "3.2.0",
"justinmimbs/timezone-data": "2.1.4",
"lukewestby/elm-string-interpolate": "1.0.4",
"mdgriffith/elm-markup": "3.0.1",
"mdgriffith/elm-ui": "1.1.5",
"miniBill/elm-codec": "1.2.0",
"noahzgordon/elm-color-extra": "1.0.2",
"rtfeldman/elm-hex": "1.0.0",
"rtfeldman/elm-iso8601-date-strings": "1.1.3",
"tripokey/elm-fuzzy": "5.2.1",
"zwilias/json-decode-exploration": "6.0.0"
},
"indirect": {
"Skinney/murmur3": "2.0.8",
"billstclair/elm-xml-eeue56": "1.0.1",
"dmy/elm-imf-date-time": "1.0.1",
"elm/bytes": "1.0.8",
"elm/file": "1.0.5",
"elm/random": "1.0.0",
"elm/regex": "1.0.0",
"elm/virtual-dom": "1.0.2",
"fredcy/elm-parseint": "2.0.1",
"justinmimbs/time-extra": "1.1.0",
"lazamar/dict-parser": "1.0.2",
"mgold/elm-nonempty-list": "4.1.0",
"ryannhg/date-format": "2.3.0"
}
},
"test-dependencies": {
"direct": {
"elm-explorations/test": "1.2.2"
},
"indirect": {}
}
}
Binary file added images/icon-png.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 33 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import hljs from "highlight.js/lib/highlight";
import "highlight.js/styles/github.css";
import elm from 'highlight.js/lib/languages/elm';
import './src/tailwind-compiled.css';

// we're just importing the syntaxes we want from hljs
// in order to reduce our JS bundle size
// see https://bjacobel.com/2016/12/04/highlight-bundle-size/
hljs.registerLanguage('elm', elm);


import "./style.css";
// @ts-ignore
window.hljs = hljs;
const { Elm } = require("./src/Main.elm");
const pagesInit = require("elm-pages");

pagesInit({
mainElmModule: Elm.Main
});

window.addEventListener('load', function() {
loadCss('https://use.fontawesome.com/releases/v5.12.1/css/all.css');
});

function loadCss(url) {
var head = document.getElementsByTagName('HEAD')[0];
var link = document.createElement('link');
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = url;
head.appendChild(link);
}
3 changes: 3 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build]
publish = "./dist/"
command = "export ELM_HOME=\"$NETLIFY_CACHE_DIR/elm\" && npm run build"
Loading

0 comments on commit de4e013

Please sign in to comment.