leo
leo copied to clipboard
packages with existing package.json files try to compile non .ino deps to weird results
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
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:
- Only try to build modules ending in ".ino". This seems pretty restrictive.
- In package.json add a property
leoIgnore
to ignore js dependencies. - Or the other direction, manually specify leo dependencies with
leoDependancies
. - 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?
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. =)