Coder Social home page Coder Social logo

提个小建议 about fis-plus HOT 8 CLOSED

fex-team avatar fex-team commented on June 28, 2024
提个小建议

from fis-plus.

Comments (8)

xiangshouding avatar xiangshouding commented on June 28, 2024

@tobeyouth 居然有这样的情况,我咋不知道;-p就是合并的意思啊。

from fis-plus.

tobeyouth avatar tobeyouth commented on June 28, 2024

@xiangshouding 我又试了一下,还是不行...
使用-p的话,是不是需要在fis-conf中将pack这个字段写上啊?

另外,也可能是我没表述清楚,我的代码是这样的:

var $ = require('common:static/js/zepto.js'),
      template = require('common:static/js/common.js');

xxxxxxx

然后我是期望代码可以合并成:

define('common:static/js/zepto');
define('common:static/js/template');
define('widget:static/js/xxxx');

这样。

或者也可以合并成这样:

zepto的一大坨
template的一大坨
xxxx

但是试了几次都没有成功。

ps:如果方便留个qq或者hi可以么。

from fis-plus.

xiangshouding avatar xiangshouding commented on June 28, 2024

依赖都是不会合并进去的,你再确认下。
2014年5月22日 下午5:32于 "tobeyouth" [email protected]写道:

@xiangshouding https://github.com/xiangshouding 我又试了一下,还是不行...
使用-p的话,是不是需要在fis-conf中将pack这个字段写上啊?

另外,也可能是我没表述清楚,我的代码是这样的:

var $ = require('common:static/js/zepto.js'),
template = require('common:static/js/common.js');

xxxxxxx

然后我是期望代码可以合并成:

define('common:static/js/zepto');
define('common:static/js/template');
define('widget:static/js/xxxx');

这样。

或者也可以合并成这样:

zepto的一大坨
template的一大坨
xxxx

但是试了几次都没有成功。

ps:如果方便留个qq或者hi可以么。


Reply to this email directly or view it on GitHubhttps://github.com//issues/15#issuecomment-43866573
.

from fis-plus.

tobeyouth avatar tobeyouth commented on June 28, 2024

@xiangshouding 依赖的是需要手动合并么?我看fis官网上有个modjs,这个modjs有相关的fis插件么?可以完成自动解析依赖,然后将合并模块成一个js文件。

from fis-plus.

2betop avatar 2betop commented on June 28, 2024

目前没有,在计划之中

from fis-plus.

xiangshouding avatar xiangshouding commented on June 28, 2024

@tobeyouth 这个跟seajs实现原理不一样,FIS整个合并文件是通过配置来搞定的;预先根据静态资源的访问情况进行手动配包(设置pack),然后才会进行打包。可能有些人会问,这样会不会很麻烦,如果文件多了确实有这个问题,所以FIS团队在FISP的基础上实现了一个自动打包的服务,这个不是严格按照依赖来进行打包的。而是按照组件的使用情况,是一个对全站访问的得到一个最优解。而不是单纯去优化某一个页面。

from fis-plus.

tobeyouth avatar tobeyouth commented on June 28, 2024

@xiangshouding 你所说的自动打包服务怎么使用,找了半天没找到...
还有个问题,可能纯属个人习惯问题,所以仅当参考哈:

就是比如有模块多重依赖的情况,也就是 A-->B-->C这种。这种情况下,如果人工打包的话,很容易就漏打包文件进去,毕竟使用者不会很清楚组件的依赖情况。

from fis-plus.

xiangshouding avatar xiangshouding commented on June 28, 2024

@tobeyouth 我们还有个项目是自动打包项目,不需要人工配包即可实现相当不错的打包结果。

from fis-plus.

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.