Giter VIP home page Giter VIP logo

Comments (3)

yyfrankyy avatar yyfrankyy commented on September 28, 2024

该功能类似ender里的"ender": "./ender.js" 不同的是,ender要求开发者事先打包好,而spm只要求提供自定义的wrapping template。

但是transport的时候就需要先从npm server安装,然后读取package.json 进而transport,再部署到spm的server端。

from spm.

yyfrankyy avatar yyfrankyy commented on September 28, 2024

拆分为几个子任务:

  1. 读取package.json里的spm,该配置声明tspt的位置,读取模板进而打包
  2. 直接调用npm的安装接口,install的时候先查spm服务,查不到,尝试查询npm,然后安装,安装完了递归打包。

比较麻烦的问题是,npm安装的模块大部分不止一个文件,批量transport之后,在web端其实可能会导致require乱序?

from spm.

lifesinger avatar lifesinger commented on September 28, 2024

暂不考虑,npm 的大部分模块在 web 端无法简单通过 wrap 来实现通用化

from spm.

Related Issues (20)

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.