![]() ![]() The uglify plugin - in which we get all files from static directory that have the extension js and concatenate them in the static/ file. We defined the configuration file package.json from which we get the project details. Grunt.loadNpmTasks('grunt-contrib-watch') ![]() Grunt.loadNpmTasks('grunt-contrib-uglify') Gruntfile.js– in this field we configure grunt and the required plugins. Grunt-contrib-watch - grunt plugin for watching over our app sources and push the changes to minified file Grunt-contrib-uglify - grunt plugin for minifying our app Now npm is installing all defined dependencies: Save this file and let npm to do some magic: We defined the name, author, version and devDependencies of our application. "description": "Angular demo app - search repos on github", Package.json – in this file we have to define dependencies for our application. |_ //the resulting file after minifying our angular app Our application structure is looking like this: If for some reason npm is not installed run: Read here how to deal with it.Ĭheck if nodejs and npm are installed, go to your command line and type: Here you can get in trouble because there is a conflict between nodejs and another package called node. In this post you can find the installation guidance for the required tools on Ubuntu, but if you follow the links you'll find detailed information about how to install them on different operating systems. So we have the app, we have a live demo, let’s get into details. You should look at the structure on github repository. In the demo above I modified the code structure to work in the codepen way, so it is only for the sake of having a live demo. See the Pen Angular demo - search repos on github by Cioban Andrei on CodePen.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |