jeudi 15 décembre 2016

ember/npm addon with dependencies/ devDependencies

I have created an ember addon which relies on gulp derived packages to build, so in the addon it has the following in package.json.

When the addon is included in the main application, the build fails due to the various gulp modules being missing. The addon is in the devDependencies section of the main application.

The addon also builds into the main application when it is in through npm link. My question is how should the addon dependencies be handled so the main application builds without a local copy of the module?

Addon JSON file

{
  "name": "My Addon",
  "version": "0.0.0",
  "description": "The default blueprint for ember-cli addons.",
  "directories": {
    "doc": "doc",
    "test": "tests"
  },
  "scripts": {
    "build": "ember build",
    "start": "ember server",
    "test": "ember try:each",
    "postinstall": "gulp build && bower install"
  },
  "repository": {
    "type": "git",
    "url": "git://github.com/myaddon.git"
  },
  "engines": {
    "node": ">= 0.12.0"
  },
  "author": "",
  "license": "MIT",
  "devDependencies": {
    "bootstrap": "^4.0.0-alpha.5",
    "broccoli-asset-rev": "^2.4.5",
    "broccoli-funnel": "^1.0.9",
    "ember-ajax": "^2.4.1",
    // more ember modules
    "find-root": "^0.1.1",
    "font-awesome": "^4.7.0",
    "glob": "^4.5.3",
    "gulp": "^3.9.1",
    "gulp-clean-css": "^2.2.1",
    "gulp-concat": "^2.6.0",
    "gulp-connect": "^2.2.0",
    "gulp-filter": "^3.0.1",
    "gulp-git": "^1.4.0",
    "gulp-rename": "^1.2.2",
    "gulp-sass": "^2.3.2",
    "gulp-sourcemaps": "^1.5.2",
    "gulp-task-loader": "^1.2.1",
    "gulp-template": "^3.0.0",
    "gulp-uglify": "^1.2.0",
    "gulp-zip": "^3.0.2",
    "lazypipe": "^1.0.1",
    "loader.js": "^4.0.10",
    "run-sequence": "^1.1.2"
  },
  "keywords": [
    "ember-addon"
  ],
  "dependencies": {
    "ember-cli-babel": "^5.1.7"
  },
  "ember-addon": {
    "configPath": "tests/dummy/config"
  }
}




Aucun commentaire:

Enregistrer un commentaire