webpack-strip-block
Advanced tools
Comparing version 0.0.3 to 0.1.0
/*jslint node:true */ | ||
"use strict"; | ||
var loaderUtils = require("loader-utils"); | ||
function StripBlockLoader(content) { | ||
var query = loaderUtils.parseQuery(this.query); | ||
var startComment = query.start || 'develblock:start'; | ||
var endComment = query.end || 'develblock:end'; | ||
var startComment = 'develblock:start'; | ||
var endComment = 'develblock:end'; | ||
var regexPattern = new RegExp("[\\t ]*\\/\\* ?" + startComment + " ?\\*\\/[\\s\\S]*?\\/\\* ?" + endComment + " ?\\*\\/[\\t ]*\\n?", "g"); | ||
@@ -10,0 +12,0 @@ |
{ | ||
"name": "webpack-strip-block", | ||
"version": "0.0.3", | ||
"version": "0.1.0", | ||
"description": "Webpack plugin to strip blocks of code that's only intended for development purposes", | ||
@@ -21,3 +21,8 @@ "main": "index.js", | ||
}, | ||
"contributors": [{ | ||
"name": "Alexander Wunschik", | ||
"email": "mail@wunschik.it", | ||
"url": "http://www.wunschik.it" | ||
}], | ||
"license": "MIT" | ||
} | ||
} |
@@ -36,2 +36,13 @@ Webpack Strip Block | ||
}; | ||
``` | ||
``` | ||
It is also possible to overwrite the `start` and `end` variables with url-encoded string values: | ||
```javascript | ||
{ | ||
module: { | ||
loaders: [ | ||
{ test: /\.js$/, loader: "webpack-strip-block?start=DEV-START&end=DEV-END" } | ||
] | ||
} | ||
}; | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3494
15
48