Skip to content

--dir option#7

Open
mattdesl wants to merge 6 commits intomax-mapper:masterfrom
mattdesl:feature-dir
Open

--dir option#7
mattdesl wants to merge 6 commits intomax-mapper:masterfrom
mattdesl:feature-dir

Conversation

@mattdesl
Copy link
Copy Markdown
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
Copy Markdown
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