Fis--fis-config.js

Source: Internet
Author: User

Step 1. Remove the following comment to open the simple plugin, note the need to first plug-in installation npm install-g fis-postpackager-simple
After the pack is set, FIS will only package files by default and will not replace static resource references in the page, we can load the packaging module by introducing back-end static resource management. However, you can also use the Fis-postpackager-simple plugin to automatically replace a separate resource reference in a page with a packaged resource.
Fis.config.set (' Modules.postpackager ', ' simple ');

Automatically merge results with pack settings to combine common resources into one file, which is more conducive to sharing between pages

Step 2. Remove the comment below to turn on pack manual intervention
Fis.config.set (' pack ', {
' Pkg/lib.css ': [
'/lib/normalize/3.0.2/**.css '
],
' Pkg/lib.js ': [
'/lib/zepto/1.0.1/zepto.js ',
'/lib/zepto/1.0.1/ztouch.js ',
'/lib/make_thumb/1.01/**.js ',
'/lib/avalon/1.38/**.js '
],
' Pkg/comp.css ': [
'/comp/**.less ',
'/comp/**.css '
],
' Pkg/comp.js ': [
'/comp/**.js '
],
' Pkg/widgets.css ': [
'/src/m/widgets/**.less ',
'/src/m/widgets/**.css '
],
' Pkg/widgets.js ': [
'/src/m/widgets/**.js '
],
' Pkg/page.css ': [
'/src/m/pages/base/**.css ',
'/src/m/pages/base/**.less '
],
' Pkg/page.js ': [
'/src/m/pages/base/com.js '
]
});

Step 3. Cancel the comments below to open the simple to NPM install-g fis-postpackager-simple
Fis.config.set (' Settings.postpackager.simple.autoCombine ', true);

Compiling less files with the Fis-parser-less plugin
Fis.config.set (' modules.parser.less ', ' less ');
Less files are compiled and output as CSS files
Fis.config.set (' roadmap.ext.less ', ' css ');

Compiling the jade file using the Fis-parser-jade plugin
Fis.config.set (' Modules.parser.jade ', ' Jade ');
The jade file is compiled and output as an HTML file
Fis.config.set (' Roadmap.ext.jade ', ' html ');

Configuring FIS to use Csssprites
Fis.config.set (' Modules.spriter ', ' csssprites ');

Turn on csssprites for all style resources
Fis.config.set (' Roadmap.path ', [
{
Reg: ' **.less ',
Usesprite:true
},
{
Reg:/\/src\/m\/pages\/(. *\.jade) $/i,//device Edition
Reg:/\/src\/mobile\/pages\/(. *\.jade) $/i,//End
Release: '/page/$1 '
}
]);

Set the merge spacing for CSS Sprites
Fis.config.set (' Settings.spriter.csssprites ', {
The margins between graphs
Margin:10,
Using matrix arrangement, the default is linear ' linear '
Layout: ' Matrix ',
The rule does not allow write background-size if scale is set
scale:0.5
});

Fis.config.merge ({
Roadmap: {
On line ↓
Domain: "Lu Jin"
}
});

Fis--fis-config.js

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.