Code Monkey home page Code Monkey logo

elm-quickstart's Introduction

Elm-quickstart template

$ make help

Usage:
  make <target>

Targets:
  site       Build site with optimize and compress resulting javascript.
  site-dev   Build site without optimizing.
  watch      Watch files for changes and recompile when necessary.
  help       Show this help.

It usually takes me a little bit of time to get started with a new elm project. But I wanna get started right away, as fast as possible! ๐Ÿš€

I tend to copy-paste some boilerplate from other projects, so I collected some of it in this template repository. I hope to keep things simple while still providing functionality like recompiling on file changes etc.

This is tailored to my preferences, like using a simple Makefile to collect the various build/deploy/live-reload commands I need. I am open to changing things to make it more useful for other people.

I just found out about GitHub templates, which is a nice fit for this sort of setup. Just use the green button above.

Dependencies

There are some basic dependencies that help my development workflow a lot:

Install the first two with your package manager of choice, on mac I just do brew install ripgrep entr.

Install uglifyjs with npm install -g uglify-js. This is used to massively reduce the file size of the resulting .js file, adapted from https://guide.elm-lang.org/optimization/asset_size.html.

If anybody thinks that these dependencies could (and should) be simplified even further, I am open to suggestions and pull requests. Just open an issue to discuss.

Go go go

After cloning this repo as a template (github: green button above), all you have to do is remove this glorious README and initialize the elm project:

rm Readme.md
elm init

Run make help to

If you clone directly with git clone, remember to also nuke the local git repo:

rm -rf .git
git init

Deployment

This template doesn't really include any deployment commands, since these generally differ a lot from project to project.

As an example, for a server you have ssh access to, using rsync as follows is my favourite. I only syncs modified files and it deletes anything on the target that was removed in your local folder:

rsync -crv -e ssh --delete site/ $(USER)@$(SERVER):$(FOLDER)

In other situations, I deploy on github-pages or the amazing Netlify!

elm-quickstart's People

Contributors

2mol avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

mdxprograms

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.