0.1.4 • Published 7 years ago

fis-preprocessor-smarty-hmr v0.1.4

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

fis-preprocessor-smarty-hmr

fis preprocessor to smarty for start a remote hmr server.

Usage

Setting fis-conf.js

  1. Setting hotreload.port
// Example
fis.set('hotreload.port', '8888');
  1. Setting to smarty

By setting config to fis preprocessor. May contain multiple pages.

// Example
fis.match('*.tpl', {
    preprocessor: fis.plugin('smarty-hmr', {
        config: [{
            pagePath: 'page/index.tpl',
            bundleName: 'bundle.js',
            blockName: 'top-head-extend',
            exclude: 'a.js',
            // exclude: ['a.js', 'b.js'],            
            valid: true
        }]
    }),
});

Config item options

optionsdescriptiontyperequireddefault
pagePathpath to pageStringYES-
bundleNamebundle file nameStringYES-
blockNamewhich smarty block to inject bundle fileStringOPTIONALtop-head-extend
excludeexclude js nameString or ArrayOPTIONAL-
validif this rules is validBooleanOPTIONALtrue

Starting via fis release

You need to set env HOT=true and start fis release:

Intergration in npm script:

$ npm i cross-env -S
"scripts": {
  "release": "cross-env HOT=true fis3 release",
}

By running command in cli:

$ npm run release -- [fis3 media]
0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago