Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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',
.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')
});
});
.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')
});
});
},
{
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
scriptPlaceHolder: "",
stylePlaceHolder: '',
resourcePlaceHolder: '',
resourceType: 'auto',
processor: {
'.html': 'html'
},
obtainScript: true,
obtainStyle: true,
useInlineMap: false
})
});
fis.match('*', {
deploy: fis.plugin('local-deliver', {
to: root+"/xpy"
})
})
fis.match("*.html", {
useHash: false,
packTo:root+"/xpy/aaaa.html"
});
fis.match("**/*.js", {
release: '/static/$0'
});
fis.match("**/*.css", {
release: '/static/$0'
});