Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option 'cwd' #15

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Add option 'cwd' #15

wants to merge 2 commits into from

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