Skip to content

Add option 'cwd'#15

Open
feeela wants to merge 2 commits intoBradDenver:masterfrom
turbine-kreuzberg:cwd
Open

Add option 'cwd'#15
feeela wants to merge 2 commits intoBradDenver:masterfrom
turbine-kreuzberg:cwd

Conversation

@feeela
Copy link

@feeela feeela commented May 11, 2015

Issue

Currently we can only execute Preen from the root of a Bower package, i.e. where a file named .bowerrc is present. In case this tool is run from outside the Bower repository (e.g. when incorporating into CI environments), it fails to find the Bower configuration.

This pull request

Add an option 'cwd' to set the current working directory and execute Preen from e.g. a parent directory of the Bower project. This option now can be set to any Bower package and it doesn't matter anymore, from where Preen was executed.

I also decided to use path.join instead of string concatenation to avoid duplicate slashes in a a path (example as it occurred before: path/to/project//bower_components/…)

Example

var preen = require( 'preen' );

preen.preen( {
    cwd: 'path/to/project/containing/.bowerrc'
} )

Thomas Heuer added 2 commits May 11, 2015 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant