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

URL backslash fix + Prettifying JSON + Exclude paths #3

Merged
merged 4 commits into from
Feb 13, 2014

Conversation

boycce
Copy link
Contributor

@boycce boycce commented Jan 24, 2014

Fixing url backslashes

  • path.join in windows seems to convert all fordslashes into backslashes, regulating to the system path structure.

Prettifying JSON

  • Tests were prettified but stopped working, simple patch.

Added exclude : [path/, ...]

  • Grunt-tree doesn't support "Building the files object dynamically". So in return, excluding files was not available.
//To exclude any directory or path, simply add an array of URIs:
options : {
    exclude : [
        'css/style.css',
        'img/',
        'js/bootstrap/secret.js' ]
}

Note: All paths are relative to the "current directory" / "cwd"

- path.join in windows seems to convert all fordslashes into backslashes
regulating to the system path structure.

- Prettifying all JSON
Grunt-tree doesn't support "Building the files object dynamically".
So in return excluding files was not available.

To exclude any directory or path, simply add an array of URIs:
options : {
exclude : ['css/style.css',
'img/',
'js/bootstrap/secret.js' ]
}

Note: All paths are relative to the "current directory" / "cwd"
@yss
Copy link
Owner

yss commented Jan 27, 2014

1. Fixing url backslashes:

Why use fordslashes (slashes) in all system? I thought it depend on system.

2. Prettifying JSON

This is ok, and different people have different indent. So, we can add it to config?

3. Added exclude : [path/, ...]

Pretty good.

- Patched backslashes (UNC paths) fix , so that format+ext is working
again.

- Made UNC paths optional. (Default is false.)
UNC paths form backlashes in windows and fordslashes on linux.

- Prettify is now optional. (Default is false.)
@boycce
Copy link
Contributor Author

boycce commented Jan 28, 2014

Gidday Yss

UNC Paths

  • You are correct, it varies on each system (UNC paths). I have made it optional and off by default.
    Return files in UNC paths via: uncpath : true
  • This does not interfere with format/ext options now :)

Prettifying JSON

  • Made optional like requested. To turn on use: prettify : true

- {Format : false} made files with identical naming, across directories,
override one another. Simple patch
yss added a commit that referenced this pull request Feb 13, 2014
URL backslash fix + Prettifying JSON + Exclude paths
@yss yss merged commit 856a402 into yss:master Feb 13, 2014
@boycce
Copy link
Contributor Author

boycce commented Feb 13, 2014

Awesome thanks!

@yss
Copy link
Owner

yss commented Feb 21, 2014

Sorry for reply later.

Can you improve the document and tests? And I can publish to new version

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.

2 participants