How to use the fis3.file function in fis3

To help you get started, we’ve selected a few fis3 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github fex-team / fis3-hook-commonjs / test / index.js View on Github external
it('compile cmd JS file', function() {
    release({
      unique: true
    }, function() {
      console.log('Done');
    });
    var pathx = path.join(__dirname, 'xpy' , 'static' , 'map.json');
    var file = fis.file.wrap(pathx);
    var con = file.getContent()

    //console.log(JSON.parse(con).res["demo.js"].extras);
    var xpath = JSON.stringify(JSON.parse(con).res["demo.js"].extras);
    expect(xpath).to.equal('{"async":["demo3.js","common:module2/cc/c.js"],"moduleId":"demo"}');

    //console.log(JSON.parse(con).res["init.js"].deps);
    var xpath = JSON.stringify(JSON.parse(con).res["init.js"].deps);
    expect(xpath).to.equal('["module/b.js"]');

    var xpath = JSON.stringify(JSON.parse(con).res["init.js"].extras);
    expect(xpath).to.equal('{"async":["module/jquery.js","module/data.js","module/b.js","module2/cc/c.js","common:module2/cc/c.js"],"moduleId":"init"}');

    var xpath = JSON.stringify(JSON.parse(con).pkg);
    expect(xpath).to.equal('{"p0":{"uri":"/static/x.js","type":"js","has":["demo.js","demo2.js","module/b.js","init.js"],"deps":["common:module2/cc/c.js","common:static/a.js","module/a.js"]}}');

fis3

fis 3.0

BSD-2-Clause
Latest version published 1 year ago

Package Health Score

54 / 100
Full package analysis