Giter Site home page Giter Site logo

mattwhelan / grunt-vendor Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 2.0 148 KB

Use NPM to managed browser dependencies, then use grunt-vendor to harvest the modules into a web-friendly vendor library tree.

License: Apache License 2.0

JavaScript 100.00%

grunt-vendor's Introduction

grunt-vendor

Use NPM to managed browser dependencies, then use grunt-vendor to harvest the modules into a web-friendly vendor library tree.

Configuration:

vendor: {
  stage: {
    options: {
      "requirejs": {
        webFiles: ["require.js"]
      }
    },
    src: ["package.json"],
    dest: "static/vendor"
  }
},

The files for the vendor task are package.json files to be processed. For each package.json, its 'dependencies' will be deployed to the dest dir. The files copied for each dependency resolve as follows:

  1. options[moduleName].webFiles
  2. modules's package.json's webFiles array
  3. modules's package.json's main file.

So, for a browser library like lodash, just lodash.js gets deployed to the dest dir. For something like requirejs, you'll want to override the 'main', because r.js isn't what you want browser-side.

TODO:

Full Grunt file syntax for webFiles (with cwd and such).

grunt-vendor's People

Contributors

mattwhelan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.