New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

prismic-cli

Package Overview
Dependencies
Maintainers
7
Versions
113
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prismic-cli

Command line to bootstrap prismic projects.

  • 4.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.2K
decreased by-53.65%
Maintainers
7
Weekly downloads
 
Created
Source

prismic-cli

Command line tool to bootstrap prismic projects.

oclif Version Downloads/week License

Usage

$ npm install -g prismic-cli
$ prismic COMMAND
running command...
$ prismic (-v|--version|version)
prismic-cli/4.0.0 darwin-x64 node-v15.11.0
$ prismic --help [COMMAND]
USAGE
  $ prismic COMMAND
...

Commands

prismic help [COMMAND]

USAGE
  $ prismic help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @oclif/plugin-help

prismic list

USAGE
  $ prismic list

OPTIONS
  -h, --help  show CLI help

See code: src/commands/list.ts

prismic login

USAGE
  $ prismic login

OPTIONS
  -h, --help                           show CLI help
  --email=email                        email address
  --oauthaccesstoken=oauthaccesstoken  oauth access token for sso
  --password=password                  password

See code: src/commands/login.ts

prismic logout

USAGE
  $ prismic logout

OPTIONS
  -h, --help  show CLI help

See code: src/commands/logout.ts

prismic new

USAGE
  $ prismic new

OPTIONS
  -d, --domain=domain        name of the prismic repository ie: example, becomes https://example.prismic.io
  -f, --folder=folder        name of project folder
  -g, --generator=generator  Run a local yeoman generator
  -h, --help                 show CLI help
  -t, --template=template    Prismic template for the project
  --force                    over write local files
  --skip-install             prevent running install command after generating project

See code: src/commands/new.ts

prismic signup

USAGE
  $ prismic signup

OPTIONS
  -h, --help           show CLI help
  --email=email        email address
  --password=password  password

See code: src/commands/signup.ts

prismic slicemachine

USAGE
  $ prismic slicemachine

OPTIONS
  -d, --domain=domain    prismic repo to to create
  -f, --force
  -h, --help             show CLI help
  --add-storybook        add storybook to a slicemachine project
  --bootstrap            reconfigure a slicemachine project
  --create-slice         add a slice to a slicemachine project
  --develop              run slice machine
  --folder=folder        output directory
  --framework=next|nuxt
  --library=library      name of the slice library
  --list                 list local slices
  --setup                setup slice machine in an already existing project
  --skip-install         prevent npm install from running
  --sliceName=sliceName  name of the slice

ALIASES
  $ prismic sm

See code: src/commands/slicemachine.ts

prismic theme [FILE]

USAGE
  $ prismic theme [FILE]

OPTIONS
  -d, --domain=domain        name of the prismic repository ie: example, becomes https://example.prismic.io
  -f, --folder=folder        name of project folder
  -h, --help                 show CLI help
  -t, --theme-url=theme-url  Url or path to the theme
  --config=config            [default: prismic-configuration.js] path to prismic configuration file
  --customTypes=customTypes  [default: custom_types] path to custom types directory in the theme
  --documents=documents      [default: documents] path to documents in the theme
  --force                    over-write local files

See code: src/commands/theme.ts

prismic whoami

USAGE
  $ prismic whoami

OPTIONS
  -h, --help  show CLI help

See code: src/commands/whoami.ts

Development

Running Locally

  • Clone this repository git clone https://github.com/prismic.io/prismic-cli
  • Enter the newly cloned repository and install the dependencies with npm install or yarn
  • Commands can be executed from the bin/run file i.e: ./bin/run --help

Testing

Run tests with npm test or yarn test The main testing libary used is @oclif/test the documentation on how to use the testing library can be found here https://github.com/oclif/fancy-test

Linting

eslint is automatically run after the test script, but it can also be invoked by running npm run posttest or yarn posttest, optionally with a --fix flag.

Built With

Files and Folders

This should change in later releases.

src/prismic/communication.ts Handles communication and sessions with prismic. This class is injected in to commnads as this.prismic.

src/prismic/base-command.ts Customized command class used in src/commands that provides an instance of this.prismic and a few utility methods shared across commands.

src/prismic/generator.ts Sets up a yeoman-environment used by the new and theme commands.

src/generators Yeoman generators for source code generation. src/generators/base A customized base yeoman generator that provided utility methods for generating a prismic project.

src/utils utility functions, library configuration and a proxy for fs modules so the modules can be used and mocked during the tests while leaving other uses in different libraries un-mocked.

Keywords

FAQs

Package last updated on 19 Apr 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc