GithubHelp home page GithubHelp logo

fis's Introduction

Front End Integrated Solution.

Unfinished until version 1.0.0

Quick start

# install fis
$ npm install -g fis

# start local server
$ fis server start

# install service
$ fis server install pc2

$ mkdir project

$ cd project
 
# install a pc2-demo project
$ fis install pc2-demo
 
# release your project to local server
$ fis release --watch
 
# browse http://localhost:8080/photo

Commands

Usage: fis <command>

Commands:

  release     build and deploy your project
  install     install components and demos
  server      launch a php-cgi server

Options:

  -h, --help     output usage information
  -v, --version  output the version number
  --no-color     disable colored output

more information:

Configure fis

# create fis config file
$ vim path/to/project/fis-conf.js
fis.config.merge({    //merge user settings
    //using namespace, it can be omitted.
    namespace : 'photo',
    //configure directory and release specification.
    roadmap : {
        ext : {
            //all the less files will be compiled into css files.
            less : 'css'
        },
        domain : {
            //add domain to all js files.
            '*.js' : 'http://img.baidu.com'
        },
        path : [    //configure directory specification.
            {
                //all the files in "/test/" directory
                reg : /^\/test\//i,
                //will not be released
                release : false
            },
            {
                //all the js & css files in "/widget/" directory
                reg : /^\/widget\/.*\.(js|css)$/i,
                //is modular file
                isMod : true,
                //release to "path/to/output/static/photo/..."
                release : '/static/${namespace}$&'
            },
            {
                //all the tpl files in "/widget/" directory
                reg : /^\/widget\/(.*\.tpl)$/i,
                //is modular file
                isMod : true,
                //resource locator is "widget/photo/..."
                url : 'widget/${namespace}/$1',
                //release to "path/to/output/template/widget/photo/..."
                release : '/template/widget/${namespace}/$1'
            },
            {
                //all the files in "/plugin/" directory
                //will be released to "path/to/output/plugin/..."
                reg : /^\/plugin\//i
            },
            {
                //other tpl files
                reg : /^\/.+\.tpl$/i,
                //release to "path/to/output/template/photo/..."
                release : '/template/${namespace}$&'
            },
            {
                //photo-map.json
                reg : /^\/photo-map\.json$/i,
                //release to "path/to/output/config/photo-map.json"
                release : '/config$&'
            },
            {
                //any other files
                reg : /^.*$/,
                //release to "path/to/output/static/photo/..."
                release : '/static/${namespace}$&'
            }
        ]
    },
    deploy : {
        'rd-test' : { //a deploy example
            //remote receiver
            receiver : 'http://zhangyunlong.fe.baidu.com/receiver.php',
            //post all the released files to the reciever
            //and save them to "/home/zhangyunlong/public_html/"
            to : '/home/zhangyunlong/public_html/'
        }
    },
    modules : { //using plugins
        parser : {
            //parse less file with "fis-parser-less" plugin
            //fis-parser-less is not built-in
            //install it by "npm install -g fis-parser-less"
            less : 'less'
        }
    },
    settings : { //plugin settings
        optimizer : {
            //configure uglify-js plugin
            //@see https://npmjs.org/package/uglify-js
            'uglify-js' : {
                booleans : true,
                if_return : false,
            }
        }
    }
});

fis's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.