Giter Club home page Giter Club logo

hyas-cli's Introduction

@hyas/cli

npm CodeQL

Hyas command line tool.

Installation

Install the Hyas CLI globally:

npm install -g @hyas/cli

npx

Or use npx:

npx @hyas/cli <command> [options]

Usage

hyas <command> [options]

Commands

Create

Create a new Hyas project:

hyas create [dir]
Arguments Description Default
dir Directory to create the project in my-hyas-site
-c, --child Use child theme Use starter theme
-t, --theme Hyas theme to use (e.g. --theme=doks) No Hyas theme

Start

Start local development server:

hyas start

Build

Build production website:

hyas build

Clean

Delete temporary directories:

hyas clean

Check

Check local environment:

hyas check

Options

-h, --help

Show help for command.

-v, --version

Show @hyas/cli version.

Documentation

hyas-cli's People

Contributors

dependabot-preview[bot] avatar h-enk avatar

Stargazers

 avatar

Watchers

 avatar  avatar

hyas-cli's Issues

Git fatal error ๐Ÿšจ

Summary

  1. When .git file is deleted, yarn start causes fatal error.
  2. When git init, yarn start causes fatal error.

Basic example

PS D:\DEV\hyas-git-error> yarn start
yarn run v1.22.5
$ hugo server --disableFastRender
Start building sites โ€ฆ
ERROR 2020/10/10 10:35:33 Failed to read Git log: fatal: not a git repository (or any of the parent directories): .git
Built in 1596 ms
Error: Error building site: logged 1 error(s)
error Command failed with exit code 4294967295.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
PS D:\DEV\hyas-self-clone> yarn start
yarn run v1.22.5
$ hugo server --disableFastRender
Start building sites โ€ฆ
ERROR 2020/10/10 10:47:54 Failed to read Git log: fatal: your current branch 'master' does not have any commits yet
Built in 1171 ms
Error: Error building site: logged 1 error(s)
error Command failed with exit code 4294967295.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Motivation

Making it work again ๐Ÿ˜ฌ

Add preview and functions flags to build command

Summary

Add preview and functions flags to build command.

Basic example

Based on current npm build command (using arguments):

  • hyas build: build production website, including lambda functions
  • hyas build preview: build production website, including draft and future posts, including lambda functions
  • hyas build functions: build lambda functions

Should be:

  • hyas build: build production website
  • hyas build --preview: build production website, including draft and future posts
  • hyas build --functions: build production website, including lambda functions
  • hyas build --preview --functions: build production website, including draft and future posts, including lambda functions

Motivation

Align with (to be updated) npm build command.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.