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

Conact Magento JS Files #100

Closed
mklooss opened this issue Nov 13, 2014 · 3 comments · May be fixed by #134
Closed

Conact Magento JS Files #100

mklooss opened this issue Nov 13, 2014 · 3 comments · May be fixed by #134

Comments

@mklooss
Copy link
Contributor

mklooss commented Nov 13, 2014

we discussed internal (with @riker09) about to merge the origin magento files also to the scripts.js in gulp/grunt

Magento Head Example

<script type="text/javascript" src="http://localhost/js/prototype/prototype.js?v1"></script>
<script type="text/javascript" src="http://localhost/js/lib/ccard.js?v1"></script>
<script type="text/javascript" src="http://localhost/js/prototype/validation.js?v1"></script>
<script type="text/javascript" src="http://localhost/js/scriptaculous/builder.js?v1"></script>
<script type="text/javascript" src="http://localhost/js/scriptaculous/effects.js?v1"></script>
<script type="text/javascript" src="http://localhost/js/scriptaculous/dragdrop.js?v1"></script>
<script type="text/javascript" src="http://localhost/js/scriptaculous/controls.js?v1"></script>
<script type="text/javascript" src="http://localhost/js/scriptaculous/slider.js?v1"></script>
<script type="text/javascript" src="http://localhost/js/varien/js.js?v1"></script>
<script type="text/javascript" src="http://localhost/js/varien/form.js?v1"></script>
<script type="text/javascript" src="http://localhost/js/mage/translate.js?v1"></script>
<script type="text/javascript" src="http://localhost/js/mage/cookies.js?v1"></script>

concat all Magento files into one file (without uglify) - magento.js
conact all boilerplate files into one file (with uglify) - boilerplate.js
merge magento.js and boilerplate.js into scripts.js

so we only got 1 js file :D

@bencorlett
Copy link
Contributor

I like it.

Got a proof of concept you could put in a PR?

Sent from my iPhone

Please excuse my brevity

On 13 Nov 2014, at 8:27 pm, Mathis Klooß notifications@github.com wrote:

we discussed internal (with @riker09) about to merge the origin magento files also to the scripts.js in gulp/grunt

Magento Head Example

<script type="text/javascript" src="http://localhost/js/prototype/prototype.js?v1"></script> <script type="text/javascript" src="http://localhost/js/lib/ccard.js?v1"></script> <script type="text/javascript" src="http://localhost/js/prototype/validation.js?v1"></script> <script type="text/javascript" src="http://localhost/js/scriptaculous/builder.js?v1"></script> <script type="text/javascript" src="http://localhost/js/scriptaculous/effects.js?v1"></script> <script type="text/javascript" src="http://localhost/js/scriptaculous/dragdrop.js?v1"></script> <script type="text/javascript" src="http://localhost/js/scriptaculous/controls.js?v1"></script> <script type="text/javascript" src="http://localhost/js/scriptaculous/slider.js?v1"></script> <script type="text/javascript" src="http://localhost/js/varien/js.js?v1"></script> <script type="text/javascript" src="http://localhost/js/varien/form.js?v1"></script> <script type="text/javascript" src="http://localhost/js/mage/translate.js?v1"></script> <script type="text/javascript" src="http://localhost/js/mage/cookies.js?v1"></script>

concat all Magento files into one file (without uglify) - magento.js
conact all boilerplate files into one file (with uglify) - boilerplate.js
merge magento.js and boilerplate.js into scripts.js

so we only got 1 js file :D


Reply to this email directly or view it on GitHub.

@ottonet
Copy link
Contributor

ottonet commented Nov 13, 2014

I would love this as well!


Sent from Mailbox

On donderdag, nov. 13, 2014 at 10:29 a.m., Ben Corlett notifications@github.com, wrote:
I like it.

Got a proof of concept you could put in a PR?

Sent from my iPhone

Please excuse my brevity

On 13 Nov 2014, at 8:27 pm, Mathis Klooß wrote:

we discussed internal (with @riker09) about to merge the origin magento files also to the scripts.js in gulp/grunt

Magento Head Example

concat all Magento files into one file (without uglify) - magento.js
conact all boilerplate files into one file (with uglify) - boilerplate.js
merge magento.js and boilerplate.js into scripts.js

so we only got 1 js file :D


Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub.@github.com>

@kiprasbal
Copy link

If you are using Grunt, just Add to your gruntfile.js something like this :)

var theme_path = 'skin/frontend/your_theme/default';
var js_path = 'js';

grunt.initConfig({
concat: {
dist: {
files:[
{
src: [
js_path + '/prototype/prototype.js',
js_path + '/lib/jquery/jquery-1.10.2.min.js',
js_path + '/lib/jquery/noconflict.js',
js_path + '/lib/ccard.js',
js_path + '/prototype/validation.js',
js_path + '/scriptaculous/builder.js',
js_path + '/scriptaculous/effects.js',
js_path + '/scriptaculous/dragdrop.js',
js_path + '/scriptaculous/controls.js',
js_path + '/scriptaculous/slider.js',
js_path + '/varien/js.js',
js_path + '/varien/form.js',
js_path + '/mage/translate.js',
js_path + '/mage/cookies.js'
],
dest: theme_path + '/js/main.js'
}
]
}
},
uglify: {
dist: {
files: [{
src: theme_path + '/js/main.js',
dest: theme_path + '/js/main.min.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 a pull request may close this issue.

4 participants