Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

knockout-template-loader

Package Overview
Dependencies
Maintainers
7
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

knockout-template-loader - npm Package Compare versions

Comparing version 1.0.1 to 2.0.0-webpack4.1

.babelrc

10

lib/index.js
"use strict";
var _loaderUtils = require("loader-utils");
var utils = require("loader-utils");
var _loaderUtils2 = _interopRequireDefault(_loaderUtils);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function loaderFn(source) {

@@ -13,4 +9,4 @@ this.cacheable();

var sourcePart = source.replace("module.exports", "var htmlContent");
var options = _loaderUtils2.default.getLoaderConfig(this, "knockoutTemplateLoader");
var name = options.name || _loaderUtils2.default.interpolateName(this, "[name]-[ext]", {});
var options = utils.getOptions(this);
var name = options.name || utils.interpolateName(this, "[name]-[ext]", {});

@@ -17,0 +13,0 @@ return ["var ko = require('knockout');", "var stringTemplateEngine = require('knockout-template-loader/lib/string-template-engine');", sourcePart, "ko.templates['" + name + "'] = htmlContent;"].join("\n");

{
"name": "knockout-template-loader",
"version": "1.0.1",
"version": "2.0.0-webpack4.1",
"description": "Knockout html template loader for webpack",

@@ -16,28 +16,20 @@ "main": "lib/index.js",

"homepage": "https://github.com/civicsource/knockout-template-loader",
"babel": {
"presets": [
"es2015",
"react",
"stage-2"
]
},
"scripts": {
"compile": "babel -d lib src",
"prepublish": "rimraf lib && npm run compile"
"compile": "rimraf lib && babel -d lib src",
"prepublish": "rimraf lib && yarn run compile"
},
"dependencies": {
"loader-utils": "^0.2.15"
"loader-utils": "^1.1.0"
},
"devDependencies": {
"babel-cli": "^6.8.0",
"babel-core": "^6.3.15",
"babel-preset-es2015": "^6.3.13",
"babel-preset-react": "^6.3.13",
"babel-preset-stage-2": "^6.3.13",
"rimraf": "^2.5.2"
"babel-cli": "^6.26.0",
"babel-core": "^6.26.0",
"babel-preset-env": "^1.6.1",
"rimraf": "^2.6.2"
},
"peerDependencies": {
"knockout": ">=3.3",
"webpack": ">=4.0",
"html-loader": ">=0.4"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc