shakyShane / html-injector

BrowserSync html injector
78 stars 21 forks source link

[Add] Grunt installation command #32

Open Kristinita opened 6 years ago

Kristinita commented 6 years ago

1. Summary

I add installation command for Grunt. New Grunt users may not understand, how correctly install html-injector. --save-dev argument always need for Grunt.

2. Behavior before pull request

If Grunt users install plugin as in description:

D:\Kristinita>npm i browser-sync bs-html-injector
npm WARN The package grunt is included as both a dev and production dependency.
npm WARN The package grunt-shell is included as both a dev and production dependency.

npm ERR! path D:\Kristinita\node_modules\browser-sync\certs
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall unlink
npm ERR! Error: EPERM: operation not permitted, unlink 'D:\Kristinita\node_modules\browser-sync\certs'
npm ERR!  { Error: EPERM: operation not permitted, unlink 'D:\Kristinita\node_modules\browser-sync\certs'
npm ERR!   cause:
npm ERR!    { Error: EPERM: operation not permitted, unlink 'D:\Kristinita\node_modules\browser-sync\certs'
npm ERR!      errno: -4048,
npm ERR!      code: 'EPERM',
npm ERR!      syscall: 'unlink',
npm ERR!      path: 'D:\\Kristinita\\node_modules\\browser-sync\\certs' },
npm ERR!   stack: 'Error: EPERM: operation not permitted, unlink \'D:\\Kristinita\\node_modules\\browser-sync\\certs\'',
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'unlink',
npm ERR!   path: 'D:\\Kristinita\\node_modules\\browser-sync\\certs',
npm ERR!   parent: 'Pelican' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\SashaChernykh\AppData\Roaming\npm-cache\_logs\2018-01-13T14_31_34_996Z-debug.log

3. Behavior after pull-request

If Grunt users install plugin with --save-dev argument:

D:\Kristinita>npm i browser-sync bs-html-injector --save-dev
npm WARN The package grunt is included as both a dev and production dependency.
npm WARN The package grunt-shell is included as both a dev and production dependency.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

+ bs-html-injector@3.0.3
+ browser-sync@2.23.5
added 9 packages and updated 1 package in 37.069s

4. Testing environment

Thanks.