Coder Social home page Coder Social logo

samwangdd / mdf-js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ajean/mdf-js

1.0 1.0 0.0 1.18 MB

magic development framework

License: Other

JavaScript 47.99% AppleScript 2.16% HTML 0.58% TypeScript 42.41% Smarty 4.75% Shell 0.06% SCSS 0.31% Vue 1.75%

mdf-js's Introduction

目录说明

  • core 核心代码 @mdf/core
  • plugins 插件集
  • mdf 对外使用的主要 pkg,命令都由这个包提供
  • runtime 运行时,主要处理浏览器里面的框架功能
  • create-mdf-app 脚手架
  • types 都懂的
  • plugins-react 框架层
  • plugins-web 应用层
  • bundler-webpack 构建层
  • plugins-domain 业务层
  • plugins-deploy 部署层

mdf

整个框架对外的模块,提供全局的 namespace mdf

  • 项目运行时,编译时都有这个模块导出

create-mdf-app

主要用于创建项目,会为项目自动安装 mdf 通过 yarn create mdf 启动

yarn

yarn 的 workespace,将 npm 统一安装到 root 模块中 本地 yarn link 调试比较方便,npm link 要解决很多路径的问题

构建

dev & build 时一定要有 MDF_ENV 变量 约定这个变量完全由脚本命令传入,不传就是 dev 内部使用该变量进行判断!!

开发模式

使用 father-build 构建代码,通过 yarn link 到目标模块进行调试

构建

两种方式全包构建(发布)和单模块构建(开发),不要改动 scripts 里面的脚本!

  • yarn build
  • yarn build runtime,直接输入目录名不是 package name
  • watch 模式:yarn build --w

体验开发流程

发布流程

注意开发完发布一定要整体 build 一次,因为不是所有的模块都使用了 cjs,records 模块必须手动修改并且记录 release!!

  • yarn build
  • yarn pub

控制台优化

参考 nest.js cli 和 vue cli,优化输出

  • 举个例子 actions/new.action.ts/printCollective

mdf-js's People

Contributors

ajean avatar

Stargazers

 avatar

Watchers

 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.