GithubHelp home page GithubHelp logo

Comments (4)

QzoneTouch avatar QzoneTouch commented on July 3, 2024

远端manifest设计里是通过config传递的,但是你完全可以稍微修改代码,让插件自己去拉取manifest。看实际应用场景。
设计config传递是用于manifest内容跟随页面一起输出的情况。

from commonwidget.

donson avatar donson commented on July 3, 2024

嗯嗯,我这边也是自己拉取manifes�t适合一点。

还请教个问题,manifest文件的内容,你们应该也是自动生成的吧,比如用 grunt 生成md5版本?

from commonwidget.

woc2006 avatar woc2006 commented on July 3, 2024

是手工填的,有改成自动生成的计划。

from commonwidget.

donson avatar donson commented on July 3, 2024

@woc2006 我已经改成自动生成了,用了grunt的一个插件:https://npmjs.org/package/grunt-cachebuster

cachebuster: {
    options: {
        basedir: '../common/js',
        length: 10,
        formatter: function(hashes) {
            var output = "define('apm/manifest', [], function(){ var mod = ";
            output += JSON.stringify(hashes);
            output += ";var manifest = {}; for(var key in mod){ manifest['http://m.aipai.com/mobile/common/js/'+key] = mod[key] }; return manifest; });";
            return output;
        }
    },
    mobile: {
        src: ['../common/js/mobile/**/*.js', '../common/js/apm/*.js'],
        dest: '../common/js/apm/manifest.js'
    }
}

from commonwidget.

Related Issues (7)

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.