GithubHelp home page GithubHelp logo

miragefront's Introduction

test

test是由generator-bee生成。

调试

模块文件使用CMD规范,是无法使用源码直接调试的,所以bee 内置了个本地静态服务,运行:

gulp

会编译文件到build目录,同时会起一个本地server,访问:http://localhost:5555/test/index.js,就是访问test/src/index.js文件。

包配置路径指向本地服务:

//url带有ks-debug
if(KISSY.config('debug')){
    base = 'http://localhost:5555/test/';
}
KISSY.config({
    packages: [
        {
            name: 'test',
            base: base,
            ignorePackageNameInUri: true,
            debug: true,
            combine:false
        }
    ]}
);

写法请参考demo/dev_index.html。

线上调试

可以使用chales或fiddler代理工具,将包路径代理到本地服务路径。

构建

打包文件

gulp

监听文件改变实时编译

gulp watch

默认编译less和生成kissy模块名和依赖表。

生成的目录结构

bee-demo           // 工程名,也是库名
|      |-----src    // 源码目录
|      |     |---------index.js     // index页面入口脚本
|      |     |---------mods     // 依赖的业务模块
|      |     |---------index.less     // index页面样式
|      |-----build    // 发布目录
|      |     |---------deps.js     // 模块依赖表
|      |-----demo    // demo目录
|      |-----test    // 测试用例目录
|      |-----build    // 发布目录
|      |-----README.md      // 库介绍
|      |-----gulpfile.js   // gulp打包时使用的配置信息
|      |-----package.js     // 依赖包配置

miragefront's People

Contributors

limeng32 avatar

Watchers

James Cloos avatar  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.