美文网首页
第三方依赖应该放在哪里

第三方依赖应该放在哪里

作者: Transnet2014 | 来源:发表于2017-04-19 18:53 被阅读14次

    返回导航

    #413

    In index.html there are 2 types of auto-injected files during gulp build and gulp serve:

    • CSS part
    • JS part

    CSS

    They are inserted at end of head by 2 blocks that write 2 files containing all the CSS.

    • ``: Any bower's vendor stylesheets present in bower.json under property dependencies (:warning: not devDependencies) AND located in /bower_components/

    • ``: Yours stylesheets who match with any files located into /src/{app,components}/**/*.{css,scss,less,styl}

    JS

    They are inserted at end of body by 2 blocks that write 2 files containing all the JS.

    • ``: Any bower's vendor scripts present in bower.json under property dependencies (:warning: not devDependencies) AND located in /bower_components/

    • ``: Yours scripts who match with any files located into /src/{app,components}/**/*.{js,es6,ts,coffee}

    Where to place the third-party files (scripts and stylesheets) who are not installed with bower ?

    • Without auto-inject feature: you can use any folders except /src/app/ and /src/components/
    • With auto-inject feature: you should use /src/app/ and /src/components/
    • With auto-inject feature in custom folder: you should complete gulp's tasks
    Notes:
    • the parsing of javascript files is managed in /gulp/script.js
    • the parsing of css files is managed in /gulp/styles.js
    • the injection in index.html is managed in /gulp/inject.js

    返回导航

    相关文章

      网友评论

          本文标题:第三方依赖应该放在哪里

          本文链接:https://www.haomeiwen.com/subject/mvphzttx.html