I'm using firefox and google chrome. Yes it is, but I have two node_modules. One in the web folder and another one in project directly ( arborescence : project => bin, src, app, web=>node_modules library root, node_module, tests, var....)
But each files for bootstrap are in the node_modules from the web folder.
Can you open a terminal and type curl -i {url} - replacing {url} with the exact URL that the browser is trying to load the style sheet from please? What does the output show?
Standard guidance from Symfony is to use other tools to manage front-end code and put the results into the web/ directory. I personally use npm like you pulling various libraries into the node_modules/ directory. I then use Grunt with less and uglify to build web/js/lib.js and web/css/lib.css - I merge jQuery, DataTables, etc. into these two files. My base twig template then has <link href="{{ asset('css/lib.css') }}" rel="stylesheet"> and <script src="{{ asset('js/lib.js') }}"></script> in the right places. Works great.
I'll add that getting the right .js and .css/.less files pulled together in the correct order was much clearer when I looked at https://datatables.net/download/ and select the Individual Files option near the bottom. I just mimicked the Package Results section in my Gruntfile using the node_modules/ content instead.
Indeed @pdugas, It's what I would like to do. However, after have downloadead the .js and .css I can't place them together in the correct order in my base twig template since the result of the web page isn't in bootstrap. I followed the advice from the site but no issues.
Answers
It sounds like a routing issue with your web server. Are you sure that
node_modules
is in your web path? What are you using as your web server?Allan
I'm using firefox and google chrome. Yes it is, but I have two node_modules. One in the web folder and another one in project directly ( arborescence : project => bin, src, app, web=>node_modules library root, node_module, tests, var....)
But each files for bootstrap are in the node_modules from the web folder.
Can you open a terminal and type
curl -i {url}
- replacing{url}
with the exact URL that the browser is trying to load the style sheet from please? What does the output show?Allan
I tried, nothing appear, syntax error, can't use curl -i.
Standard guidance from Symfony is to use other tools to manage front-end code and put the results into the web/ directory. I personally use npm like you pulling various libraries into the node_modules/ directory. I then use Grunt with less and uglify to build web/js/lib.js and web/css/lib.css - I merge jQuery, DataTables, etc. into these two files. My base twig template then has
<link href="{{ asset('css/lib.css') }}" rel="stylesheet">
and<script src="{{ asset('js/lib.js') }}"></script>
in the right places. Works great.Do you have
curl
installed?Sounds like @pdugas's advise is the way to go.
Allan
I'll add that getting the right .js and .css/.less files pulled together in the correct order was much clearer when I looked at https://datatables.net/download/ and select the Individual Files option near the bottom. I just mimicked the Package Results section in my Gruntfile using the node_modules/ content instead.
Indeed @pdugas, It's what I would like to do. However, after have downloadead the .js and .css I can't place them together in the correct order in my base twig template since the result of the web page isn't in bootstrap. I followed the advice from the site but no issues.
UP, finally resolved. Forgot to put this:
and to download bootstrap3 in my project, so was a bit difficult to make it right lol.. feel a bit stupid ^^
Thanks everyone for your help, awesome plugin you did, great works. Have a nice day