leo icon indicating copy to clipboard operation
leo copied to clipboard

packages with existing package.json files try to compile non .ino deps to weird results

Open soldair opened this issue 10 years ago • 2 comments

for example https://github.com/Pinoccio/library-bitlash/blob/master/package.json

this includes some node js deps for testing or whatever. these should be ignored. the owner of the package should be able to override this behavior in their npm scripts for install if they want to compile deps that do not end in ".ino"

noting it here because i didn't have a chance to fix it today

soldair avatar Jun 14 '14 05:06 soldair

Figured I'd run into this sooner of later. Currently leo scans the node_modules directory and tries to compile each module as a leo package. If you have js dependencies it can screw things up.

Few alternatives I've been thinking about:

  1. Only try to build modules ending in ".ino". This seems pretty restrictive.
  2. In package.json add a property leoIgnore to ignore js dependencies.
  3. Or the other direction, manually specify leo dependencies with leoDependancies.
  4. In leo packages specify in package.json that it's leo compatible with leo: true. Only build packages that meet that requirement. Could be problematic with people forgetting.

Any others?

AdamMagaluk avatar Jun 19 '14 12:06 AdamMagaluk

when i was thinking of this originally i just figured that each package would build itself via a build script triggered on npm install. this way it would be up to the package. it probably would be weird if everything depended on leo though.

ill think about it more and see if i can give better feedback. =)

soldair avatar Jun 19 '14 14:06 soldair