【问题标题】:How to include extension on my package.json file如何在我的 package.json 文件中包含扩展名
【发布时间】:2016-12-13 22:13:21
【问题描述】:

我想在我的package.json 文件中包含这个扩展名ol3-layerswitcher

我的 package.json:

{
  "name": "TEST",
  "version": "1.0.0",
  "description": "OpenLayers 3",
  "main": "app.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "start": "beefy app.js:bundle.js --live",
    "compile:dev": "./node_modules/.bin/browserify app.js -o bundle.js",
    "compile:prod": "./node_modules/.bin/browserify app.js | uglifyjs > bundle.js"
  },
  "author": "test",
  "license": "MIT",
  "dependencies": {
    "jquery": "^3.1.0",
    "jquery-ui": "^1.12.0",
    "openlayers": "^3.17.1",
    "ol3-layerswitcher": "^1.0.2"
  },
  "devDependencies": {
    "browserify": "^13.0.0",
    "uglify-js": "^2.7.0",
    "beefy": "^2.1.8"
  }
}

【问题讨论】:

    标签: json npm package


    【解决方案1】:

    添加这一行:

      "dependencies": {
        "jquery": "^3.1.0",
        "jquery-ui": "^1.12.0",
        "ol3-layerswitcher": "git://github.com/walkermatt/ol3-layerswitcher.git",
        "openlayers": "^3.17.1"
      }
    

    【讨论】:

      猜你喜欢
      • 2011-03-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-03-03
      • 2012-03-17
      • 1970-01-01
      • 2017-12-15
      • 2016-09-02
      相关资源
      最近更新 更多