Giter Site home page Giter Site logo

serverless-cd's People

Contributors

g-fengchen avatar hazel0928 avatar heimanba avatar mahuipengf avatar wss-git avatar xsahxl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

serverless-cd's Issues

增加缓存Cache 能力

全局缓存

作为项目级别存储:
image
实际存储NAS路径 为: /mnt/auto/cache

项目级别缓存

  • 自定义模式
cache:
    paths: 
	- ./node-modules
    	- ./public
    key: npm-${{ hashFiles('package-lock.json') }}

问题1: 如何存储数据
./node-modules./public 分别存入 /mnt/auto/${appName}/${key} 文件下
问题2: 什么时机进行数据存储
识别如果是 cache的步骤, onComplete 添加默认 存储的步骤
问题3: 缓存什么时候生效
默认在onInit 阶段生效
问题4: 缓存如何生效?
默认以软链形式进行生效,格式为 ln -s /mnt/auto/${appName}/${key}/node-modules node-modules
问题5: 软链冲突如何解决?
假设已经存在了 node_modules,如何处理冲突?

  • 简单模式
cache:
  npm: true 

等于=>

cache:
    paths: 
	- ./node-modules
     key: npm-${{ hashFiles('package-lock.json') }}

应用市场功能建设

创建流程

创建流程为:
image

包管理方案

方案1

包管理(通过NPM)

image

优点

monorepo对于统一项目管理非常方便。

缺点

无法实现单独仓库的fork

方案2(推荐)

单独serverless-cd仓库

https://github.com/serverless-cd-demo

优点:

很好的支持每个仓库fork的需求

缺点:

无法很好的进行管理,比如如何进行统一升级等

Copy组件优化

使用copy组件的时候不应该还需要父组件声明class:copy-trigger才能满足需求。可以考虑组件接收children, 组件拿到children可以声明需要的class。
image

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.