@marko/create

Create Marko projects

Stats

StarsIssuesVersionUpdatedCreatedSize
@marko/create
76196.1.05 months ago4 years agoMinified + gzip package size for @marko/create in KB

Readme


@marko/create
API Stability NPM Version Downloads

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

CLI

Example

npm

# Creates a Marko project
npm init @marko
# Creates a project called "myapp" from the "webpack" example template
npm init @marko myapp --template webpack

yarn

yarn create marko

pnpm

pnpx @marko/create

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
      
  • --installer: Override the package manager used to install dependencies. By default will determine from create command and fallback to npm.
    • marko-create --installer pnpm
      

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.

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.