Code Monkey home page Code Monkey logo

multiple-ejs-cli's Introduction

multiple-ejs-cli

node+ejs+jQuery 多页面脚手架

开发前景

  要求兼容到iE6,并且有SEO需求, 市面上一些MVVM 框架都不能用,只能用比较原始的 jquery, 
  但是mvvm的开发模式实在有很爽,于是用node webpack ejs express 
  配置了一个多页面应用程序,支持模块独立开发,模块预览,模块独立调试
  技术栈: jquery webpack ejs node express 

部署介绍

  生成静态页面部署: 1 npm run probuild
                   2 把生成的dist 拷贝到服务器上即可
  支持服务端渲染部署( css、html、js写入到内存): 
                  1 把项目通过ftp上传到服务器
                  2  npm install
                  3 pm2 start ./build/server.js production
"scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "devbuild": "webpack --config ./build/webpack.dev.config.js",
    "probuild": "webpack --config ./build/webpack.pro.config.js",
    "server": "node ./build/server.js development",
    "pro": "node ./build/server.js production"
  }
全局安装

npm install multiple-ejs-cli -g

初始化项目

m-ejs init XXX

安装依赖

npm install

本地启动服务

npm run server

测试环境打包

npm run devBuild

生产环境打包

npm run proBuild

模拟服务端渲染部署

npm run pro

开启服务

 首页: http://localhost:3001/
 预览:http://localhost:3001/contentpage

multiple-ejs-cli's People

Contributors

antbrothers avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

anzai1990

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.