I successfully got the Codesleeve Asset Pipeline (https://github.com/CodeSleeve/asset-pipeline) requiring all my various javascript and css.
My issue is when I turn on concatenation my javascript completely breaks. I am kinda a noob at js, but I think I have built things pretty sensibly.
Any help would be much appreaciated.
Here are the errors from the console:
(Basically a bunch of things that were defined before are now undefined, not sure why?!)
- Uncaught TypeError: undefined is not a function application.js:19
- Uncaught ReferenceError: Highcharts is not defined exporting.js:22
- Uncaught TypeError: Object [object Object] has no method 'plugin'
Here are my JS files when concat is off:
(everything works fine like this)
<script src="http://mysite.dev/assets/jquery-183.min.js" ></script>
<script src="http://mysite.dev/assets/detail-admin201/bootstrap.min.js" ></script>
<script src="http://mysite.dev/assets/detail-admin201/jquery-ui-1.10.2.custom.min.js" ></script>
<script src="http://mysite.dev/assets/theme.js" ></script>
<script src="http://mysite.dev/assets/datepicker.js" ></script>
<script src="http://mysite.dev/assets/select2.min.js" ></script>
<script src="http://mysite.dev/assets/pnotify.min.js" ></script>
<script src="http://mysite.dev/assets/jquery.watable.js" ></script>
<script src="http://mysite.dev/assets/number.min.js" ></script>
<script src="http://mysite.dev/assets/jquery.my.plugin.js" ></script>
<script src="http://mysite.dev/assets/highcharts.js" ></script>
<script src="http://code.highcharts.com/modules/exporting.js" ></script>
<script>
var options = {plugins various options i supply blah blah};
jQuery(function($){
// Initialize our plugin
$("#element").plugin(options);
});
</script>
Let me know if any other info would be useful. Thanks in advance.