Git Product home page Git Product logo

note-english's Introduction

项目介绍

这是一个使用gitbook构建静态网站,并自动化部署到自己的服务器上的一个模板项目

项目技术

  • markdown
  • gitbook
  • gulp
  • ftp

项目目录介绍

  • bundler 项目构建工具目录
    • Bundler.js 项目构建工具
    • Deployer.js 项目部署工具
  • src 源码目录 目录中的内容实际上就是使用gitbook init生成的内容
  • build.js 构建时被node执行的文件
  • bundler.config.js 项目构建部署配置文件
  • deploy.js 部署时被node执行的文件
  • gulpfile.js gulp配置文件
  • package.json
  • README.md
  • yarn.lock

bundler.config.js

module.exports = {
  entry: './src', // gitbook build时的入口目录
  output: './dist', // gitbook build是的输出目录
  deploy: { // 部署相关的配置
    rootPath: 'xxx', // 部署服务器根路径
    targetPath: 'dist', // 指定要将本地的哪个目录上传至服务器,如果不配置,默认为output指定的目录
    deployPath: 'dist', // 指定要上传到服务器的哪个目录中,如果不配置,默认为 rootPath/targetPath。当然如果targetPath没有给出,则就会上传到rootPath/output
    connectOptions: { // ftp模块 ftp.connect()方法的参数
      host: 'xxx,
      user: 'xxx',
      password: 'xxx'
    }
  }
}

运行脚本

# 开发预览
yarn run dev
or
npm run dev
# 项目构建
yarn run build
or
npm run build
# 项目发布
yarn run deploy
or
npm run deploy

相关参考

note-english's People

Watchers

codepan 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.