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

Removing filename from the script path #27

Open
goosechaser opened this issue Sep 30, 2014 · 4 comments
Open

Removing filename from the script path #27

goosechaser opened this issue Sep 30, 2014 · 4 comments

Comments

@goosechaser
Copy link

Assume that this is my yml config:

[...]
        prod:
            outputFolder: dist
            webPath:      /dist
            tasks: [] 
        files:
            javascripts.js:
                - vendor/js/js1.js
                - vendor/js/js2.js
[...]

The generated HTML will contain the following:

<!-- prod:dev -->
<script src="/dist/javascripts.js/js1.js"></script>
<script src="/dist/javascripts.js/js2.js"></script>
<!-- endbuild -->

Since I am not running any tasks, the script src should be /dist/ + js1.js and js2.js. If I were running a concat, then the script src should become /dist/javascripts.js.

Basically, it makes no sense to include the filename from YML into the full path.

@goosechaser goosechaser changed the title How to remove filename from the script replace path How to remove filename from the script path Sep 30, 2014
@goosechaser goosechaser changed the title How to remove filename from the script path Removing filename from the script path Sep 30, 2014
@romanschejbal
Copy link
Owner

I was done like this before I added the indexes to the end of the file. Imagine you have two files with the same filename both in different folder. Since I dont find this one as a big deal I will leave it open and fix later on. Cheers

@ollietb
Copy link
Contributor

ollietb commented Oct 6, 2014

gassetic needs to be able to delete files when they are removed from the yml for each of the merged files so the files need to be grouped together by filename

@goosechaser
Copy link
Author

Grouping is fine. My concern is that the rendered script path contains those filenames, and there should be an option to exclude it (for some environments). site.js in production should be a single concatenated file, where was in development it should be a multitude of files but they shouldn't be located in the the /site.js/ directory.

@lopsided
Copy link

+1

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

No branches or pull requests

4 participants