How to use fis3 - 10 common examples

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
//},
        scriptPlaceHolder: "",
        stylePlaceHolder: '',
        resourcePlaceHolder: '',
        resourceType: 'auto',
        processor: {
          '.html': 'html'
        },
        obtainScript: true,
        obtainStyle: true,
        useInlineMap: false
      })

    });
// fis3 release production
    fis
      .match('**', {
        useHash: false,
        release: '/static/$0'
        // domain: 'http://aaaaa.baidu.com/xpy'

      })

      .match('demo.js', {
        //optimizer: fis.plugin('uglify-js'),
        packTo: "x.js",
        isMod: true
      })
      .match('demo2.js', {
        //optimizer: fis.plugin('uglify-js'),
        packTo: "x.js",
        isMod: false
github fex-team / fis3-hook-commonjs / test / index.js View on Github external
beforeEach(function() {
    // default settings. fis3 release
    var root2 = path.join(__dirname, 'xpy');
    _.del(root2);

    fis.match('*', {
      deploy: fis.plugin('local-deliver', {
        to: root2
      })
    });
    fis.media().set("namespaceConnector",":");
    
    hookSelf({
      baseUrl: ".",
      forwardDeclaration: true,//依赖前置,
      skipBuiltinModules: false,
      paths: {
        abc: '/module/jquery.js'
      },
      packages: [
        {
          name: 'module',
github fex-team / fis3-hook-commonjs / test / index.js View on Github external
main: 'c.js'
        },
        {
          name: 'cc2',
          location: 'common:module2/cc',
          main: 'c.js'
        }
      ],
      shim: {
        'module/b.js': {
          deps: ['module/a.js'],
          exports: 'xc'
        }
      }
    });
    fis.match('::packager', {
      postpackager: fis.plugin('loader', {
        //allInOne: {
        //  ignore: '**/a.js',
        //  includeAsyncs: true,
        //  css:"pkg/aa.css"
        //
        //},
        scriptPlaceHolder: "",
        stylePlaceHolder: '',
        resourcePlaceHolder: '',
        resourceType: 'auto',
        processor: {
          '.html': 'html'
        },
        obtainScript: true,
        obtainStyle: true,
github fex-team / fis3-hook-commonjs / test / index.js View on Github external
beforeEach(function() {
    // default settings. fis3 release
    var root2 = path.join(__dirname, 'xpy');
    _.del(root2);

    fis.match('*', {
      deploy: fis.plugin('local-deliver', {
        to: root2
      })
    });
    fis.media().set("namespaceConnector",":");
    
    hookSelf({
      baseUrl: ".",
      forwardDeclaration: true,//依赖前置,
      skipBuiltinModules: false,
      paths: {
        abc: '/module/jquery.js'
      },
      packages: [
        {
          name: 'module',
          location: './module',
github fex-team / fis3-hook-commonjs / test / index.js View on Github external
.match('module/b.js', {
        //optimizer: fis.plugin('uglify-js'),
        packTo: "x.js",
        isMod: true
      })
      .match('module2/**.js', {
        // optimizer: fis.plugin('uglify-js'),
        // packTo: "x.js",
        isMod: true
      })
      .match('*.{css,scss}', {
        optimizer: fis.plugin('clean-css')
      })

      .match('*.png', {
        optimizer: fis.plugin('png-compressor')
      });

  });
github fex-team / fis3-hook-commonjs / test / index.js View on Github external
.match('module/a.js', {
        // packTo: "x.js",
        isMod: true
      })
      .match('module/b.js', {
        //optimizer: fis.plugin('uglify-js'),
        packTo: "x.js",
        isMod: true
      })
      .match('module2/**.js', {
        // optimizer: fis.plugin('uglify-js'),
        // packTo: "x.js",
        isMod: true
      })
      .match('*.{css,scss}', {
        optimizer: fis.plugin('clean-css')
      })

      .match('*.png', {
        optimizer: fis.plugin('png-compressor')
      });

  });
github fex-team / fis3-hook-commonjs / test / index.js View on Github external
},
        {
          name: 'cc2',
          location: 'common:module2/cc',
          main: 'c.js'
        }
      ],
      shim: {
        'module/b.js': {
          deps: ['module/a.js'],
          exports: 'xc'
        }
      }
    });
    fis.match('::packager', {
      postpackager: fis.plugin('loader', {
        //allInOne: {
        //  ignore: '**/a.js',
        //  includeAsyncs: true,
        //  css:"pkg/aa.css"
        //
        //},
        scriptPlaceHolder: "",
        stylePlaceHolder: '',
        resourcePlaceHolder: '',
        resourceType: 'auto',
        processor: {
          '.html': 'html'
        },
        obtainScript: true,
        obtainStyle: true,
        useInlineMap: false
github fex-team / fis3-hook-commonjs / test / index.js View on Github external
beforeEach(function() {
    // default settings. fis3 release
    var root2 = path.join(__dirname, 'xpy');
    _.del(root2);

    fis.match('*', {
      deploy: fis.plugin('local-deliver', {
        to: root2
      })
    });
    fis.media().set("namespaceConnector",":");
    
    hookSelf({
      baseUrl: ".",
      forwardDeclaration: true,//依赖前置,
      skipBuiltinModules: false,
      paths: {
        abc: '/module/jquery.js'
      },
      packages: [
        {
          name: 'module',
          location: './module',
          main: 'data.js',
          common: 'module/data.js'

        },
github fex-team / fis3-hook-commonjs / test / index.js View on Github external
describe('fis3-hook-commonjs ', function() {
  var root = path.join(__dirname, 'fis3_test_commonjs');
  fis.project.setProjectRoot(root);
  beforeEach(function() {
    // default settings. fis3 release
    var root2 = path.join(__dirname, 'xpy');
    _.del(root2);

    fis.match('*', {
      deploy: fis.plugin('local-deliver', {
        to: root2
      })
    });
    fis.media().set("namespaceConnector",":");
    
    hookSelf({
      baseUrl: ".",
      forwardDeclaration: true,//依赖前置,
      skipBuiltinModules: false,
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