Socket
Socket
Sign inDemoInstall

@w6s/cli

Package Overview
Dependencies
Maintainers
2
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@w6s/cli

A CLI for scaffolding workplus projects.


Version published
Weekly downloads
2
Maintainers
2
Weekly downloads
 
Created
Source

w6s cli npm version

A CLI for scaffolding starter projects.

Installation

Prerequisites: Node.js (>=6.x preferred) and npm.

[sudo] npm install -g @w6s/cli

Usage

1. Create a new project
$ w6s clone <template-name> <project-name>

Example:

$ w6s clone webpack-framework7 my-project

The above command pulls the template from workplus-templates/webpack-framework7, prompts for some information, and generates the project at ./my-project/.

2. Templates list
$ w6s list

All official project templates are repos in the workplus-templates organization. When a new template is added to the organization, you will be able to run w6s clone <template-name> <project-name> to use that template. You can also run w6s list to see all available official templates.

Current available templates include:

  • f7-vue Framework7 Vue Webpack starter app template.
  • rollup-starter Sample project for packages built using rollup.!
  • single-page Single-page starter project, include webpack, less, babel.
  • multiple-pages Multiple pages starter project.
3. Start a 'http-server' local static server
$ w6s server

w6s server base on 'http-server', http-server is a simple, zero-configuration command-line http server. It is powerful enough for production usage, but it's simple and hackable enough to be used for testing, local development, and learning.

Available Options:

  • -p Port to use (defaults to 8080)
  • -a Address to use (defaults to 0.0.0.0)
  • -P or --proxy Proxies all requests which can't be resolved locally to the given url. e.g.: -P http://someurl.com

Writing Custom Template

A template repo must have a template directory that holds the template files, and may have a metadata file for the template which can be a template.json file.

{
    "name": "webpack-framework7",
    "description": "A starter project for using Framework7 with Webpack via Babel!",
    "bash": ["npm install", "npm run dev"],
    "readme": "https://github.com/workplus-template/webpack-framework7#readme"
}
  • name: default value of the project name. It use for prompt process.
  • description: default value of the project description. It use for prompt process.
  • bash: log starter message after project generated.
  • readme: log documentation link after project generated.

All files inside template will be rendered using underscore, with the prompt results as the data.

Example:

<title><%= name %></title>

Development

npm install
bin/w6s clone <template-name> [project-name]
bin/w6s list
bin/w6s server

License

MIT

Keywords

FAQs

Package last updated on 31 Mar 2020

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