JSPM

  • Created
  • Published
  • Downloads 75
  • Score
    100M100P100Q66731F
  • License MIT

Create Marko projects

Package Exports

  • @marko/create

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@marko/create) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme


@marko/create
API Stability NPM Version Downloads

Used to create a template Marko project in a specific directory.

CLI

Example

# Creates a Marko project
npx @marko/create
# Creates a project called "myapp" from the "webpack" example template
npx @marko/create myapp --template webpack

Options

  • --dir: Provide a different directory to setup the project in (default to pwd).
  • --template: The name of an example from marko-js/examples.
    • An example name
      webpack
      rollup
    • A tag/branch/commit other than master is supported
      basic#next     # example branch
      webpack#v1.2.3 # repo release tag
      rollup#62e9fb1 # repo commit hash

API

Installation

npm install @marko/create

Example

import { join } from "path";
import create from "@marko/create";

create({
  dir: join(__dirname, "myapp")
}).then(() => {
  // Project as been created and dependencies installed.
  console.log("Project created");
});

Options

Options are the same as the CLI options.