Skip to the content.

NPM version NPM downloads Build Status MIT License js-standard-style

中文

Introduction

nva is scaffold toolset which offer flexible configuration base on webpack,it support development purely frontend project(html+css+js) and isomorphic project(node+react/vue)

you can also find Desktop Application named NVA Client

Install

Prerequisites: Node.js (>=6.x, LTS preferred), npm version 3+ and Git

npm install nva -g

Quick Start

  1. generate project
nva init <project name>

pull the template that you specified in question,generate project in ./<project name>,you can also specified git repo to take place

nva init <project name> -r [github repo]

The shorthand repo notation is passed to download-git-repo so you can also use things like bitbucket:username/repo for a Bitbucket repo and username/repo#branch for tags or branches

  1. start to develop
nva dev
nva dev --silent // ignore update checks
nva dev -p <port>
nva dev --client-port <client port> // specified client port for ssr project

start develop server that hot-module-replacement(HMR) enabled,feel free get into your own business

  1. build project
nva build
nva build --silent // ignore update checks

build project to dist,prepare for deploy

Supported Template

frontend boilerplate

isomorphic boilerplate

koa@2+react or koa@2+vue,server side render

More Cli

nva mod

nva mod foo
// or add mod which copied from existed module
nva mod foo -t bar
// delete existed module
nva mod foo -d

add module directory in source path, if spa is false it will add build entry in bundle.json

nva gen

nva gen --input tpl/foo --output dist

render all templates in tpl/foo and output files in dist, tpl/foo directory should contain meta.js which defined some template variables and all templates live in tpl/foo/template

Documentation