When you use docker with "multiple commands", you will write scripts like this:
run.sh
#!/bin/sh -e
pip install --upgrade poetry
poetry config settings.virtualenvs.create false
poetry installFor a while, JSX and new es6 syntax had flaky support in emacs, but there's been huge work on a lot of packages. Using emacs for JavaScript with React, ES6, and Flow (or Typescript, etc) is really easy and powerful in Emacs these days.
This is how you can work on modern web development projects with full support for tooling like JSX, Flow types, live eslint errors, automatic prettier.js formatting, and more.
web-modeweb-mode provides most of the underlying functionality, so a huge shout-out to the maintainer(s) there.
In this article, I'd like to explain why I think The Elm Architecture is fine for small components, but quite harmful for websites based on pages.
First, let's clarify what I mean by "The Elm Architecture".
The Elm Architecture's webpage describes it pretty well.
| // 'downloadFile.js', written by blending two solutions: | |
| // 'js-download' https://github.com/kennethjiang/js-file-download | |
| // 'Anders Paulsen' https://blog.jayway.com/2017/07/13/open-pdf-downloaded-api-javascript/ | |
| export function downloadFile(data, filename, mime) { | |
| // It is necessary to create a new blob object with mime-type explicitly set | |
| // otherwise only Chrome works like it should | |
| const blob = new Blob([data], {type: mime || 'application/octet-stream'}); | |
| if (typeof window.navigator.msSaveBlob !== 'undefined') { | |
| // IE doesn't allow using a blob object directly as link href. |
| module Main exposing (..) | |
| import Html exposing (Html) | |
| import Html.Attributes | |
| import Html.Events | |
| import Json.Decode as Decode exposing (Decoder) | |
| {- | |
| (Chrome only) |
| #!/bin/bash | |
| # | |
| # Ansible role test shim. | |
| # | |
| # Usage: [OPTIONS] ./tests/test.sh | |
| # - distro: a supported Docker distro version (default = "centos7") | |
| # - playbook: a playbook in the tests directory (default = "test.yml") | |
| # - role_dir: the directory where the role exists (default = $PWD) | |
| # - cleanup: whether to remove the Docker container (default = true) | |
| # - container_id: the --name to set for the container (default = timestamp) |
| customDecoder decoder toResult = | |
| Json.andThen | |
| (\a -> | |
| case toResult a of | |
| Ok b -> Json.succeed b | |
| Err err -> Json.fail err | |
| ) | |
| decoder |
| # Image neeeds to have ssh-client | |
| image: docker:git | |
| services: | |
| - docker:dind | |
| stages: | |
| - staging | |
| before_script: | |
| - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY |