Regarding the chapter "Asset processing with Grunt". Instead of creating an all.json file, there is a benefit to creating a YAML file instead. The benefit is that comments are allowed in a YAML file, but not in JSON.
So now you can do something like this, which can be really handy:
- vendor/bower/jquery/dist/jquery.js
#- not using bootstrap now, but may want to use it in the future
#- vendor/bower/bootstrap/dist/js/bootstrap.js
- vendor/yiisoft/yii2/assets/yii.js
- vendor/yiisoft/yii2/assets/yii.validation.js
- vendor/yiisoft/yii2/assets/yii.activeForm.js
Regarding the chapter "Asset processing with Grunt". Instead of creating an all.json file, there is a benefit to creating a YAML file instead. The benefit is that comments are allowed in a YAML file, but not in JSON.
In your Gruntfile.js you can do this:
'web/js/all.js': grunt.file.readYAML('assets/js/all.yml')
instead of this:
'web/js/all.js': grunt.file.readJSON('assets/js/all.json')
The all.yml YAML file should look like this:
So now you can do something like this, which can be really handy: