I've added a bower package into my project root. I'm using bower so it's easier to manage the updates for each component (one of bower's features). However I got this message after install:
no-json No bower.json file to save to
A few things:
— There is in fact a bower.json file w/i the component's folder. Should there be a global project bower.json file?
— Will this error mean the package will not update?
— The project is a WordPress project using the "WordPress-Starter-Theme" (which uses grunt to handle compass, etc). Is grunt interfering? Do I need to add anything into Gruntfile.js to manage Bower?
Thanks in advance.
A few things: — There is in fact a bower. json file w/i the component's folder.
json file which defines some information about the projects as well as a list of dependencies. The bower. json file is actually used to define a Bower package, so in effect you're creating your own package that contains all of the dependencies for your application.
Bower is a “package manager for the web.” Bower lets you install and restore client-side packages, including JavaScript and CSS libraries. For example, with Bower you can install CSS files, fonts, client frameworks, and JavaScript libraries from external sources.
You can run
bower init
to create the json file in the current directory.
Docs
If you're using Visual Studio (2017) you can simply do:
This will not only add a bower.json file, but also the .bowerrc file. Without the .bowerrc file the packages won't be copied from the hidden 'bower_components' folder to the wwwroot/lib folder.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With