Git Product home page Git Product logo

npm-deps-inject's Introduction

npm-deps-inject

Inject npm dependencies into a given HTML file. (Inspired by the popular Bower companion wiredep)

Overview

Bower is an extremely popular dependency management tool, specifically for front-end web application development. However, recently there has been a shift to use module bundlers like Webpack and Browserify. These tools focus primarily on npm modules, which are independent from Bower components. Thus, the use of Bower with projects that use ES6/ES2105 modules is becoming less and less popular.

This project is aimed at projects who have decided to utilize npm to manage their front-end dependencies, but may not have implemented a module bundler. When used as part of a build process, npm-inject-deps will parse the package.json to retrieve the project depenedencies. These dependencies are then injected into the provided HTML file(s).

(potential) Usage

(expected) Installation

$ npm install --save-dev npm-inject-deps

(conceptual) Command Line

$ injectdeps ./src/index.html [options]

(hypothetical) Gulp Stream

const inject = require('npm-inject-deps')
gulp.task('build', function () {
  gulp.src('./src/index.html')
    .pipe(inject())
    .pipe(gulp.dest('/dest');
});

(hopeful) Options

Name Type Default Description
includeDev Boolean false Whether to include the devDependencies

CLI

// TODO

.injectdepsrc

// TODO

package.json

// TODO

npm-deps-inject's People

Contributors

devlab2425 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  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.