DEV Community

Cover image for Mint πŸƒ: Getting Started
Szikszai GusztΓ‘v
Szikszai GusztΓ‘v

Posted on β€’ Edited on

11 2

Mint πŸƒ: Getting Started

Mint is a refreshing programming language for the modern web (which I am the developer of).

This is the first in the series introducing Mint and it's features.

Why use Mint?

The following list should provide a nice incentive :)

  • Strongly typed, JavaScript like syntax
  • Immutable data structures and functional programming elements
  • HTML like syntax for HTML elements and components
  • Everything included:
    • routing
    • support for components
    • styling with CSS
    • standard library
    • data store (like Redux)
    • development server
    • formatter
    • environment variable handling
    • test runner
    • documentation server
    • JavaScript interoperability
    • Progressive Web Application support
  • Optimized output (minified, mangled)
  • Dead code elimination
  • A single binary which contains the whole toolchain
  • Uses React a Platform
  • and more awesome features...

Installation

Mint comes as a single binary file: mint. To install it please follow the instructions on the install page (basically download the binary and add it to the PATH).

Creating a new project

Once you have Mint installed you can create a new project with the mint init command:

mint init my-awesome-project
Enter fullscreen mode Exit fullscreen mode

If successful you should see this:

Mint - Initializing a new project
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
βš™ Creating directory structure...
βš™ Writing initial files...

There are no dependencies!

There is nothing to do!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
All done in 2.231ms!
Enter fullscreen mode Exit fullscreen mode

This creates the following directory / file structure:

my-awesome-project
β”œβ”€β”€ source
β”‚   └── Main.mint
β”œβ”€β”€ tests
β”‚   └── Main.mint
β”œβ”€β”€ .gitignore
└── mint.json
Enter fullscreen mode Exit fullscreen mode

Development server

Mint comes with a built in development server which recompiles the code (and reloads the browser) when something changes, to start it go into the project directory and run the mint start command:

If successful you should see this:

Mint - Running the development server
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
βš™ Ensuring dependencies... 181ΞΌs
βš™ Parsing files... 2.608ms
βš™ Development server started on http://127.0.0.1:3000/
Enter fullscreen mode Exit fullscreen mode

Now you can open the running project on http://127.0.0.1:3000/ or http://localhost:3000/.

If the project is running you should see this:

Now you are up and running with a Mint project locally πŸŽ‰

Online Playground

If you just want to mess around without installing, you can use the try page on the website.

If you like to learn more about Mint check out the guide πŸ“–

In the next part I'm going to show how to create components πŸ˜‰ see you there πŸ‘‹

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

Top comments (0)

SurveyJS custom survey software

Simplify data collection in your JS app with a fully integrated form management platform. Includes support for custom question types, skip logic, integrated CCS editor, PDF export, real-time analytics & more. Integrates with any backend system, giving you full control over your data and no user limits.

Learn more

πŸ‘‹ Kindness is contagious

Please leave a ❀️ or a friendly comment on this post if you found it helpful!

Okay