github maizzle/cli v0.5.0

latest releases: v1.5.8, v1.5.7, v1.5.6...
4 years ago

This release adds 3 new CLI commands:

make:layout <filename> --directory?

Scaffolds a new Layout based on the default Layout from the Starter, at an optional --directory path. If the path provided in the --directory option does not exist, it will be created.

Example:

# scaffold a Layout in src/layouts
maizzle make:layout my-layout.njk

# use a custom directory
maizzle make:layout my-layout.njk --directory=src/layouts/amp

# the above is the same as
maizzle make:layout my-layout.njk -d=src/layouts/amp

# paths can be relative to project root, i.e. one level above
maizzle make:layout my-layout.njk -d=../amp-layouts

make:template <filename> --directory?

Scaffolds a new Template at an optional --directory path. --directory option usage is identical to make:layout above.

This is the content of the Template:

---
title: "Example title"
---

{% extends "src/layouts/default.njk" %}

{% block template %}

{% endblock %}

make:config <env> --full?

Scaffolds a new config.<env>.js in the project root. <env> is the environment name, i.e. staging.

By default, a minimal config is output, which only defines the build.destination.path:

module.exports = {
  build: {
    destination: {
      path: 'build_staging',
    },
  },
}

For a full config, use the --full option. The full config is based on the Starter's config.js, and has comments removed.

Example:

# outputs minimal `config.staging.js`
maizzle make:config staging

# outputs full `config,staging.js`
maizzle make:config staging --full

# shorter `--full` option
maizzle make:config staging -f

For all commands, if the target file already exists it will not be overwritten, and an error will be thrown.


  • Rename --dir option. 037c813
  • Update variable name for make:template command. 5a6fd51
  • Add make:config command. 6630556
  • Add make:template command. 892544c
  • Add make:layout command. 1515e29
  • Bump commander from 4.0.1 to 4.1.0 b94172c

v0.4.0...v0.5.0

Don't miss a new cli release

NewReleases is sending notifications on new releases.