Skip to content

Commit

Permalink
Update: passing projectRoot to import hooks.
Browse files Browse the repository at this point in the history
Version bump to 0.1.2
  • Loading branch information
martonsagi committed Nov 6, 2016
1 parent 1688a4f commit ddaad57
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
5 changes: 4 additions & 1 deletion lib/import-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,13 @@ module.exports = class {
*
* @param engine ImportEngine ImportEngine instance
* @param options any given CLI arguments
* @param projectInfo basic information about the project itself
*
*/
register(engine, options) {
register(engine, options, projectInfo) {
this.engine = engine;
this.cliParams = options;
this.projectInfo = projectInfo;

this.bundles = this.engine.projectConfig.build.bundles;
if (this.bundles.length === 0) {
Expand Down
9 changes: 7 additions & 2 deletions lib/import-engine.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"use strict";

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

/**
* Import Processing Engine
Expand Down Expand Up @@ -141,9 +142,13 @@ module.exports = class {
* @param options any given CLI arguments
*/
registerImporters(options) {
let projectInfo = {
projectRoot: path.join(__dirname, '..', '..', '..')
};

for (let importer of this.customImporters) {
if (importer.register) {
importer.register(this, options);
importer.register(this, options, projectInfo);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aurelia-cli-pacman",
"version": "0.1.1",
"version": "0.1.2",
"author": "Marton Sagi <hello@martonsagi.me>",
"description": "Extension to provide aurelia-cli with package management capabilities",
"homepage": "https://github.com/martonsagi/aurelia-cli-pacman",
Expand Down

0 comments on commit ddaad57

Please sign in to comment.