📜 ⬆️ ⬇️

Application on Elm in seconds

Modern browser application development has become too complex. Not so much because of this algorithmic complexity, but because of the abundance of approaches for this very development.


Having a large selection is good, but productivity does not always help. Developers are valuable, first of all, the ability to write useful business code. The problem is that the code is only part of the application. The code is accompanied by the infrastructure of many other tools that help the developer produce this code.




Create React App


Ahead of the announced schedule, Danya Abramov announced the public release of the Create React App command line tool, which simplifies the creation and further development of applications based on React.


The philosophy of this tool can be summarized in three points :



You can familiarize yourself with the basic ideas and description of the functionality in the official blog post Create Apps with No Configuration


Create Elm App


Inspired by the ideas embedded in the Create React App, I decided to support this trend and minimize the need to explore the infrastructure for people who are interested in Elm. Also, the Create Elm App is ideal for rapid prototyping.


Manual


Installation


You will need Node.js 4 for installation. # And NPM 3. #


npm install -g create-elm-app 

Create application


To create an application, run the following command at the command prompt:


 create-elm-app my-app 

Wait a few seconds until elm-package installs the necessary packages, and the application is ready for development!


image

The new application offers a minimalistic structure of files and folders, ready for development:


 my-app/ .gitignore README.md elm-package.json src/ favicon.ico index.html index.js main.css Main.elm 

Assembly


The optimized build for placing the application on the server can be done by running the elm-app build in the project root folder:


 cd my-app/ elm-app build 

Development


To run the application during development, use the server located at http: // localhost: 3000 /


 elm-app start 

image

It allows you to use Hot Module Replacement technology to dynamically load the modified code without refreshing the page.


Installing Elm packages


There are already placed about half a thousand modules for various tasks. Installing modules using the Create Elm App is as follows:


 elm-app package install evancz/elm-http -y 

No binding


At any time, you can extract all the hidden configuration from the user and continue to develop the application without the Create Elm App.


 elm-app eject 

This command will copy the necessary configuration and NPM modules for assembly and development, opening opportunities for more fine-tuning.




Hope you find this tool useful! I will be glad to feedback and suggestions


')

Source: https://habr.com/ru/post/310432/


All Articles