Skip to content

DevLab2425/npm-deps-inject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

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

About

Inject npm dependencies into a given HTML file.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published