为客户端JavaScript库使用特拉维斯CI?

阅读时长 3 分钟读完

Afshin Mehrabani提出了一个问题:Using Travis-CI for client-side JavaScript libraries?,或许与您遇到的问题类似。

回答者Odi给出了该问题的处理方式:

Yes of course you should use continous integration with client side libraries.

I personally use PhantomJS (headless webkit browser) which is already installed in Travis-CI. I think this is the better option for client-side stuff than NodeJs.

If you use Grunt, it gets even easier to use, all you need is a simple Gruntfile.js file, your tests that run in browser (I use QUnit), and a simple .travis.yml

Gruntfile.js:

-- -------------------- ---- -------
-------------- - --------------- -
    -- ------- --------------
    ------------------
        ------ -
            ------ -------------------
        -
    ---

    -- ---- ------
    ------------------------------------------

    -- ---- -- --- -----
    -------------------------- ---------
--

.travis.yml:

You can see it in action at one of my projects (source on GitHub).

希望本文对你有帮助,欢迎支持JavaScript中文网

来源:JavaScript中文网 ,转载请注明来源 https://www.javascriptcn.com/post/24883

纠错
反馈