Welcome Guest, Not a member yet? Register   Sign In
Using npm with CodeIgniter 4: Best practices?
#4

this is what I have in public :

Code:
[andrew@darkstar joesoapdev]$ tree -L 2  public
public
├── css
│   ├── bootstrap.css
│   ├── custom.css
│   ├── custom.css.map
│   ├── font-face.css
│   └── myStyle.css
├── favicon.ico
├── fonts
│   └── amadeus
├── images
│   ├── header.png
│   └── logo3.png
├── index.php
├── js
│   └── bootstrap.bundle.js
├── robots.txt
└── sounds

All thats needed for bootstrap5 5 to work is 2 files a css in css dir and a js file in js directory


to reference that js file in my template view its this line just before html closing tag :

Code:
<script src="<?php echo base_url('js/bootstrap.bundle.js');?>"></script>



No on live you dont need the node_modules directory
CMS CI4 A CMS system, runs out of the box written on top of CI4
Arch Book  CodeIgniter4 on Apache(pages 92-114) 
Github  
Reply


Messages In This Thread
RE: Using npm with CodeIgniter 4: Best practices? - by captain-sensible - 08-15-2023, 07:45 AM



Theme © iAndrew 2016 - Forum software by © MyBB