How to use the fis3.util 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-postpackager-loader / test / index.js View on Github external
fis.match("**/*.js", {
      release: '/static/$0'
    });

    fis.match("**/*.css", {
      release: '/static/$0'
    });

    release({
      unique: true
    }, function() {
      console.log('Done');
    });

    var str = fis.util.read(path.join(root, 'xpy', 'static', 'pkg', 'main.html_aio.js'));
    expect(str.indexOf("567")>0).to.be.true;
    expect(str.indexOf("1234")>0).to.be.true;
    expect(str.indexOf("wang='1'")>0).to.be.true;
    expect(str.indexOf("x =1")>0).to.be.true;
    expect(str.indexOf("abc")>0).to.be.true;

    //expect(file.getContent()).to.be.equal(fis.util.read(path.join(root, 'util','upload', 'maintar.css')));
    var str2 = fis.util.read(path.join(root, 'xpy', 'main.html'));
    var link = str2.indexOf("link");
    var head = str2.indexOf("head&&linkbody&&scritp
github fex-team / fis3-hook-commonjs / test / index.js View on Github external
/**
 * Created by ryan on 15/8/17.
 */

var fs = require('fs'),
  path   = require('path');
var fis = require('fis3');
var _      = fis.util,
  config = fis.config;
var expect = require('chai').expect;
var _release = fis.require('command-release/lib/release.js');
var _deploy = fis.require('command-release/lib/deploy.js');
var _self = require('../');

function release(opts, cb) {
  opts = opts || {};

  _release(opts, function(error, info) {
    _deploy(info, cb);
  });
}

function hookSelf(opts) {
  var key = 'modules.hook';
github fex-team / fis3-postpackager-loader / test / index.js View on Github external
/**
 * Created by ryan on 15/7/28.
 */
var fs = require('fs'),
  path   = require('path');
var fis = require('fis3');
var _      = fis.util,
  config = fis.config;
var expect = require('chai').expect;
var resource = require('../lib/resource.js');
var pack = require('../lib/pack.js');
var _release = fis.require('command-release/lib/release.js');
var _deploy = fis.require('command-release/lib/deploy.js');
var loader = require('../');

function wrapLoader(options) {
  return function(ret, pack, settings, opt) {
    settings = _.assign({}, loader.defaultOptions);
    _.assign(settings, options);
    return loader.call(this, ret, pack, settings, opt);
  }
};

fis3

fis 3.0

BSD-2-Clause
Latest version published 1 year ago

Package Health Score

52 / 100
Full package analysis