Coder Social home page Coder Social logo

hot-cli's Introduction

hot-cli

A tool can generate a complete scaffold for Node.js full-stack developping

#
 __    __    ______   .___________.        ______  __       __
|  |  |  |  /  __  \  |           |       /      ||  |     |  |
|  |__|  | |  |  |  | `---|  |----`______|  ,----'|  |     |  |
|   __   | |  |  |  |     |  |    |______|  |     |  |     |  |
|  |  |  | |  `--'  |     |  |           |  `----.|  `----.|  |
|__|  |__|  \______/      |__|            \______||_______||__|

friendly for newbies to get started, also you can use it as a front-end dev server.

install

npm i -g hot-cli

quick start

1.hot init [project name]
=> initialize the basic structure

2.npm i
=> install npm modules

3.hot serve
=> start a local development server, and now is your time

includes

- webpack
- hot-reload
- node
- browser-side developping
- server-side developping
- browser-sync
- template nunjucks

mostly for mac users.

command line

hot init [name] *       // initialize a scaffold
hot serve               // start a local server for local developping
hot pack [env]          // run webpack package
hot upload [env]        // upload your static resouces
hot new [name]          // create a front-end workdir
hot on [name]           // check or change front compile path

structure

|---  /bin              // node execute file
|---  /config           // configuration
|---  /controller
|---  /front            // front-end files for webpack package
|---  /middleware       // custom middleware
|---  /mock
|---  /public
|---  /test
|---  /util             // some utility functions
|---  /views
|---  app.js
|---  router.js

After

  1. when finished browser-side developping or 'hot new some project'

    hot pack dev

    PS: when hot new 'some project', it won't generate a manifest that for mapping.

REMEMBER: ** hot pack after hot new ** , or u will got a 'manifest not found' error

  1. after pack the resources

    hot upload dev

    PS: here you need modify some settings in config folder config your ftp account, password, etc. actually, you can just pass this step, make it your own way PS2: the static resources path will look like {ftpPath}/{uploadPath}/{your packed resources}

interaction

#
           +-------------------+
           |      browser      | ---> js, css, html
           +-------+---^-------+
                   |   |
           +-------v---+-------+
           |    renderServer   | ---> Node.js
           +-------+---^-------+
       ------------|---|------------
           +-------v---+-------+
           |        api        | ---> java, c#, etc
           +-------+---^-------+
                   |   |
           +-------v---+-------+
           |      database     |
           +-------------------+

update

2016/11/30 add front template with 'code-split' setting.
2016/12/01 add hot replace in code-split.

about

  • author: roei
  • Copyright (c) 2016 All rights reserved.

hot-cli's People

Contributors

roeis avatar

Watchers

James Cloos avatar  avatar

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.