grunt-wiredep on multiple files with different dependencies

后端 未结 1 1618
小鲜肉
小鲜肉 2021-02-14 11:01

The current project structure is somewhat like this:

-index.html
|
-bower.json
|
+-bower_components

The proposed project structure will add a f

相关标签:
1条回答
  • 2021-02-14 11:34

    You can do two different task, each with their own dependencies (bowerJson) :

      grunt.initConfig({
    wiredep: {
      app: {
        src: 'index.html',
        "bowerJson":{
          "dependencies": {
            "jquery":"=2.1.3",
              ...
          }
        }
    
      },
      app2: {
        src: 'file-with-some-other-bower-dependency.html',
        "bowerJson": {
          "dependencies": {
            "bootstrap": "~3.0.0",
            ...
          }
        }
      }}
    
    0 讨论(0)
提交回复
热议问题