Skip to content

Commit 4adf3aa

Browse files
committed
fix: add maindir support to blueprints for addon and app
1 parent 4b13376 commit 4adf3aa

File tree

5 files changed

+5
-1
lines changed

5 files changed

+5
-1
lines changed

blueprints/addon/files/__name__/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"addon"
1212
],
1313
"main": "app/addon.js",
14+
"mainDir": "dist",
1415
"license": "MIT",
1516
"dependencies": {
1617
"bluebird": "^3.4.6",

blueprints/addon/files/__name__/test/dummy/app/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import 'main-dir';
12
import sourcemaps from 'source-map-support';
23
import path from 'path';
34
import Application from './application';

blueprints/app/files/__name__/app/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import 'main-dir';
12
import sourcemaps from 'source-map-support';
23
import path from 'path';
34
import Application from './application';

blueprints/app/files/__name__/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"test": "denali test"
77
},
88
"private": true,
9+
"mainDir": "dist",
910
"engines": {
1011
"node": ">=6.2.0"
1112
},

lib/blueprint.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export default class Blueprint extends Command {
8888
let addons = findAddons(projectPkg && projectPkg.name !== 'denali');
8989
debug(`discovering available blueprints from [ ${ addons.map((a) => a.pkg.name).join(', ') } ] addons`);
9090
addons.forEach((addon) => {
91-
this.discoverBlueprintsForAddon(blueprints, addon.pkg.name, path.join(addon.dir, 'blueprints'));
91+
this.discoverBlueprintsForAddon(blueprints, addon.pkg.name, path.join(addon.distDir, 'blueprints'));
9292
});
9393
return blueprints;
9494
}

0 commit comments

Comments
 (0)