Created
July 26, 2013 15:20
-
-
Save gilesc/6089724 to your computer and use it in GitHub Desktop.
Dub subpackage woes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module app1; | |
import std.stdio; | |
import lib1; | |
void main() { | |
add(2,3).println; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module lib1; | |
int add(int x, int y) { | |
return x - y; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "testpkg", | |
"targetType": "none", | |
"version": "~master", | |
"description": "An example project skeleton", | |
"homepage": "http://example.org", | |
"copyright": "Copyright © 2000, Your Name", | |
"authors": [ | |
"Your Name" | |
], | |
"dependencies": { | |
"testpkg:lib1": "~master", | |
"testpkg:app1": "~master" | |
}, | |
"targetPath": "lib", | |
"importPaths": ["import"], | |
"subPackages": [ | |
{ | |
"name":"lib1", | |
"version": "~master", | |
"targetType": "library", | |
"targetName": "lib1", | |
"targetPath": "lib", | |
"importPaths": ["import"], | |
"sourcePaths": ["import/lib1"] | |
}, | |
{ | |
"name":"app1", | |
"version": "~master", | |
"targetType": "executable", | |
"targetName": "app1", | |
"targetPath": "bin", | |
"importPaths": ["import"], | |
"sourcePaths": ["import/app1"], | |
"dependencies": {"testpkg:lib1": "~master"} | |
} | |
], | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment