Skip to content

Commit ddaad57

Browse files
committed
Update: passing projectRoot to import hooks.
Version bump to 0.1.2
1 parent 1688a4f commit ddaad57

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

lib/import-base.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,13 @@ module.exports = class {
2828
*
2929
* @param engine ImportEngine ImportEngine instance
3030
* @param options any given CLI arguments
31+
* @param projectInfo basic information about the project itself
32+
*
3133
*/
32-
register(engine, options) {
34+
register(engine, options, projectInfo) {
3335
this.engine = engine;
3436
this.cliParams = options;
37+
this.projectInfo = projectInfo;
3538

3639
this.bundles = this.engine.projectConfig.build.bundles;
3740
if (this.bundles.length === 0) {

lib/import-engine.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"use strict";
22

3-
const stepStates = require('./import-step-states');
3+
const stepStates = require('./import-step-states'),
4+
path = require('path');
45

56
/**
67
* Import Processing Engine
@@ -141,9 +142,13 @@ module.exports = class {
141142
* @param options any given CLI arguments
142143
*/
143144
registerImporters(options) {
145+
let projectInfo = {
146+
projectRoot: path.join(__dirname, '..', '..', '..')
147+
};
148+
144149
for (let importer of this.customImporters) {
145150
if (importer.register) {
146-
importer.register(this, options);
151+
importer.register(this, options, projectInfo);
147152
}
148153
}
149154
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aurelia-cli-pacman",
3-
"version": "0.1.1",
3+
"version": "0.1.2",
44
"author": "Marton Sagi <hello@martonsagi.me>",
55
"description": "Extension to provide aurelia-cli with package management capabilities",
66
"homepage": "https://github.com/martonsagi/aurelia-cli-pacman",

0 commit comments

Comments
 (0)