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

Allow modules to be declared in parts #276

Open
StephanBijzitter opened this issue Jul 15, 2015 · 5 comments
Open

Allow modules to be declared in parts #276

StephanBijzitter opened this issue Jul 15, 2015 · 5 comments

Comments

@StephanBijzitter
Copy link

Given the following example, which works with the current version of asset_compress:

[a.js]
file1.js
file.2.js
file3.js

[b.js]
file4.js

I would like to be able to write this the following way:

[a.js]
file1.js
file2.js

[b.js]
file4.js

[a.js]
file3.js

This would allow me to organise my asset_compress file (which is extremely long) a lot better to make it easier to maintain.

@markstory
Copy link
Owner

I don't think that will be possible because of how PHP parses ini files.

@StephanBijzitter
Copy link
Author

I had to parse my .ini file into my Grunfile for javascript unit testing and wrote a node package to do so:
https://bitbucket.org/skelware/node-file-parser/src

But I'm not a hero with PHP, however I am confident it must be possible. Could you point me to the parsing logic? I wouldn't mind digging in, I just couldn't really find it myself within the five minutes I gave myself haha

@markstory
Copy link
Owner

The config parsing is in a dependency of AssetCompress'. That code is here.

You can also define intermediate targets in your config file and then 'extend' targets. This might be another way to solve your issue. Or use glob expressions.

@StephanBijzitter
Copy link
Author

Alright, thank you! I should be able to create a custom parser that does allow the behaviour I'm looking for now.

I will also take a look into your other suggestions, will stay in touch about my progress!

@HavokInspiration
Copy link

If it can be of any help, I once used this library for .ini file parsing for a project : https://pear.php.net/package/Config_Lite

I don't know if it can do what you need @StephanBijzitter, but it might be worth to take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants