forked from enviPath/enviPy
Current Dev State
This commit is contained in:
21
static/js/ketcher2/node_modules/inject-lr-script/LICENSE.md
generated
vendored
Normal file
21
static/js/ketcher2/node_modules/inject-lr-script/LICENSE.md
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
Copyright (c) 2015 Matt DesLauriers
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
|
||||
OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
42
static/js/ketcher2/node_modules/inject-lr-script/index.js
generated
vendored
Normal file
42
static/js/ketcher2/node_modules/inject-lr-script/index.js
generated
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
var respModifier = require('resp-modifier')
|
||||
var path = require('path')
|
||||
|
||||
module.exports = injectLiveReloadSnippet
|
||||
function injectLiveReloadSnippet (opts) {
|
||||
opts = opts || {}
|
||||
|
||||
var modifier = respModifier({
|
||||
rules: [
|
||||
{ match: /<body[^>]*>/i, fn: prepend }
|
||||
]
|
||||
})
|
||||
|
||||
var fn = function (req, res, next) {
|
||||
var ext = path.extname(req.url)
|
||||
if (!ext || /\.html?$/i.test(ext)) {
|
||||
if (!req.headers.accept) {
|
||||
req.headers.accept = 'text/html'
|
||||
}
|
||||
}
|
||||
modifier(req, res, next)
|
||||
}
|
||||
|
||||
fn.host = opts.host
|
||||
fn.port = opts.port
|
||||
fn.path = opts.path
|
||||
fn.local = opts.local
|
||||
|
||||
function snippet () {
|
||||
var host = fn.host || 'localhost'
|
||||
var port = fn.port || 35729
|
||||
var scriptPath = fn.path || '/livereload.js?snipver=1'
|
||||
var src = fn.local ? scriptPath : ('//' + host + ':' + port + scriptPath)
|
||||
return '<script type="text/javascript" src="' + src + '" async="" defer=""></script>'
|
||||
}
|
||||
|
||||
function prepend (req, res, body) {
|
||||
return body + snippet()
|
||||
}
|
||||
|
||||
return fn
|
||||
}
|
||||
68
static/js/ketcher2/node_modules/inject-lr-script/package.json
generated
vendored
Normal file
68
static/js/ketcher2/node_modules/inject-lr-script/package.json
generated
vendored
Normal file
@ -0,0 +1,68 @@
|
||||
{
|
||||
"_from": "inject-lr-script@^2.1.0",
|
||||
"_id": "inject-lr-script@2.1.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-5htehMEYczkGy+oB7D10Zpijn2U=",
|
||||
"_location": "/inject-lr-script",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "inject-lr-script@^2.1.0",
|
||||
"name": "inject-lr-script",
|
||||
"escapedName": "inject-lr-script",
|
||||
"rawSpec": "^2.1.0",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^2.1.0"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/budo"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/inject-lr-script/-/inject-lr-script-2.1.0.tgz",
|
||||
"_shasum": "e61b5e84c118733906cbea01ec3d746698a39f65",
|
||||
"_spec": "inject-lr-script@^2.1.0",
|
||||
"_where": "/home/manfred/enviPath/ketcher2/ketcher/node_modules/budo",
|
||||
"author": {
|
||||
"name": "Matt DesLauriers",
|
||||
"email": "dave.des@gmail.com",
|
||||
"url": "https://github.com/mattdesl"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/mattdesl/inject-lr-script/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"resp-modifier": "^6.0.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "inject live reload into HTML content",
|
||||
"devDependencies": {
|
||||
"request": "^2.53.0",
|
||||
"serve-static": "^1.10.2",
|
||||
"stacked": "^1.1.1",
|
||||
"standard": "^5.4.1",
|
||||
"tape": "^3.5.0"
|
||||
},
|
||||
"homepage": "https://github.com/mattdesl/inject-lr-script",
|
||||
"keywords": [
|
||||
"inject",
|
||||
"live",
|
||||
"reload",
|
||||
"tiny-lr",
|
||||
"lr",
|
||||
"tiny",
|
||||
"tinyreload",
|
||||
"html"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "inject-lr-script",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/mattdesl/inject-lr-script.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "standard && node test/test.js"
|
||||
},
|
||||
"version": "2.1.0"
|
||||
}
|
||||
Reference in New Issue
Block a user