Grunt

Aus Open Source Ecology - Germany
Version vom 25. August 2022, 18:26 Uhr von Andreas Plank (Diskussion | Beiträge) (Hilfe:Kategorisieren von Seiten: Ergänze Kategorie:English pages)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)
Zur Navigation springen Zur Suche springen

Install

Use in a new Grunt project

  • npm install
    • read all the module dependencies from package.json and install them from npm software repository into the local folder node_modules.
  • grunt
    • runs the default registered task in Gruntfile.js.


Installing Grunt and gruntplugins:

  • npm install <module> --save-dev
    • installs the module locally and adds it to the devDependencies section of package.json, using a tilde version range

Structure

  • package.json - contains various metadata about an Node Packaged Modules. Project identification and description, project's dependencies, ...
    • dependencies field is used to list all the dependencies of your project that are available on npm
    • devDependencies are dependencies not required for normal operation, but required/recommended if you want to patch or modify the project. E.g. testing framework
    • package.json - an interactive guide
  • Gruntfile.js - defines, loads and configures Grunt tasks.

Others


See Bower, Javascript.