Skip to content

--dir option #7

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

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

--dir option #7

wants to merge 6 commits into from

Conversation

mattdesl
Copy link
Contributor

Adding --dir option. This is a breaking API change since the from is now resolved using the path option.

eg

wzrd test.js:bundle.js --dir test

Would work with the following folder structure:

test/
    test.js
    bundle.js
    index.html
    image.png

Thoughts? Will add some tests shortly.

EDIT: Another way of handling this would be to only have path affect the ecstatic basedir. This way you could do wzrd src/index.js:bundle.js --dir public. Maybe that makes more sense?

Also, maybe the CLI & API should use the same name: both dir or path.

@mattdesl
Copy link
Contributor Author

Ok, after a bit of tinkering with my own tools I think this was fine as you had it before: only using the path argument for ecstatic root and index.html base path. Also best to stick to --path since there is no breaking changes needed. Updated the tests and code to the old style. Also adding options in the readme.

Usage:

wzrd src/index.js:bundle.js --path test

e.g.

test/
    index.html ( <sript src="bundle.js"> )
    image.png
src/
    index.js

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