@herospark/hero-themes-cli
TypeScript icon, indicating that this package has built-in type declarations

1.0.6 • Public • Published

GitHub version

Hero Themes Cli

Usage

Instalation

$ npm install -g @herospark/hero-themes-cli

To run hero commands in the theme folder, go to the theme folder and run: (it's necessary to compile ES6 js files)

$ npm init

$ npm install --save-dev @herospark/hero-themes-cli
or
$ npm install --save-dev @babel/core @babel/plugin-transform-runtime @babel/preset-env @babel/runtime

Commands

The general command like "hero login", "hero whoami", "hero token" can be used from anyplace in your command line. Theme commands like "hero t:use", "hero t:s", etc should be used inside a theme folder.

Command Alias Description orgs
login Login with your Edools credentials
token It shows your token
whoami Display the current logged in user
theme:deploy t:deploy Deploy your theme.
theme:deployci t:deployci Deploy your theme in a ci environemnt. --root [jsBuildRootFile] (optional), --env, --themeID, --token
theme:list t:l List all themes of your workspace.
theme:use t:use Select a theme to work.
theme:copy t:c Duplicate a theme of your workspace.
theme:publish t:p Set the published theme of the logged school.
theme:download t:d Download a file or download all files by giving empty file arg.
theme:upload t:u Upload a file or uploads all files by giving empty file arg.
theme:serve t:s Create a local server which observes for changes in your local files and upload it to your enviroment url. --root [jsBuildRootFile]

How it works?

Authentication

The authentication is made by the service /services/netrc and the authentication tokens are stored in the standart file ~/.netrc.

Browsersync

It creates a proxy that rewrites the server endpoints with the local endpoints

CI Integration

add these commands to your build

$ npm install -g @herospark/hero-themes-cli
$ hero t:deployci --env=<staging | production> --themeID=<theme id here> --token=<your token here>

Development

Local development

Run the commands

$ npm install
// It keeps listening for typescript changes and compile
$ npm run watch
// Add and link the local cli folder to the global scope of node
$ npm link

After this you can run a hero command from anywhere in the terminal

$ hero ...

Deploy

Code merged into main branch will trigger package publication in NPM using Github Actions Workflow. Publishing will only occur when version at package.json changes.

Roadmap

  • create the command theme:init

Readme

Keywords

none

Package Sidebar

Install

npm i @herospark/hero-themes-cli

Weekly Downloads

14

Version

1.0.6

License

ISC

Unpacked Size

93.3 kB

Total Files

67

Last publish

Collaborators

  • mateusleonardi.herospark
  • williambelchior