Skip to content
This repository has been archived by the owner on Mar 29, 2024. It is now read-only.

Creating a New Project

Michael Nutt edited this page Mar 23, 2018 · 4 revisions

Each app has an associated project repository, and while your app can be named anything, the project repository name should not contain spaces or special characters. We suggest a convention of lowercasing the app name and replacing dashes with spaces. So for instance, if you want to name your app My Current Weather, you would call your repository my-current-weather.

You can place your projects anywhere you want; in this guide we will assume that you want to create a projects directory in your home directory. You can do it like so:

$ mkdir ~/projects
$ cd ~/projects

From within your projects directory, you can use the movable command to create a new project:

$ movable new my-current-weather
installing app
  create .editorconfig
  create README.md
  create app/img/.gitkeep
  create app/index.html
  create app/js/index.js
  create app/styles/style.css
  create bin/setup-deploy
  create .gitignore
  create karma.conf.js
  create manifest.yml
  create package.json
  create rollup.config.js
  create tests/helper.js
  create tests/tests.js
  create yarn.lock
Yarn: Installed dependencies
Successfully initialized git.
Movable app successfully created. To start the dev environment, run 
`movable serve` from the app's directory. For more details, use `movable help`.

You should see that the MDK has created a ~/projects/my-current-weather. You can change to that directory with

$ cd my-current-weather

The MDK has create a project skeleton--a fully working app with some reasonable defaults from which you can build. Some files of note:

  • manifest.yml - This file contains all of the app's specification and configuration settings.
  • app/index.html - This HTML file becomes the code inside the HTML panel in the platform, and is used to render the content.
  • app/js/index.js - Becomes the code inside the JavaScript panel in the platform, and contains your business logic.
  • app/styles/style.css - Becomes the content inside the CSS panel in the platform, and can override the visual styling of your app.
  • tests/tests.js - You can write acceptance tests for common use cases of your app, to give you confidence that the app is working correctly.
  • package.json - Contains any javascript npm dependencies your app may have.
  • node_modules/ - Directory containing all of your npm dependencies, it is listed in .gitignore so is intentionally not checked into your repository.

Next: Development

Clone this wiki locally