Gathering detailed insights and metrics for required-loader-mirror
Gathering detailed insights and metrics for required-loader-mirror
Gathering detailed insights and metrics for required-loader-mirror
Gathering detailed insights and metrics for required-loader-mirror
npm install required-loader-mirror
Typescript
Module System
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
4
Loader receives a file tree from a template and import them with the necessary parameters settings.
It can be used to import any kind of files. You can use it in javascript files or style files. Works great with ng-include and ng-cache when developing angular applications.
npm i required-loader-mirror --save-dev
Add in your code comment:
1/* input string in code */ 2//@require "./modules/**/index.js" 3 4/* output */ 5require('./modules/one/index.js'); 6require('./modules/two/index.js'); 7require('./modules/three/index.js'); 8
Add in your code comment:
1//@require "./modules/**/index.js?import[]=angular,go={hello:'world'}"
1//@require "./modules/**/index.js?import[]=angular,import[]=$=jquery,go={hello:'world'}" 2 3//@require "./**/!(index|config|run)*" 4 5//@require "./**/*" 6 7//@require "./**/*.html"
1/* input string in style file */ 2@require "./**/!(app|bootstrap).css"; 3@require "./**/*.less"; 4@require "./**/*.scss"; 5@require "./**/*.styl"; 6/* output */ 7@import 'style/header.css'; 8@import 'style/layout.css'; 9@import 'style/menus.css';
1{ 2test: /\.js$/, 3 loader: 'required?import[]=angular', 4} 5 6OR 7 8loaders: ["ng-annotate","babel","required?import[]=angular,params={ip:'0.0.0.0'}"]
1{ 2test: /\.css$/, 3 loader: 'required', 4} 5 6OR 7 8loader: ExtractTextPlugin.extract("style","css?sourceMap!postcss!required")
Param | Description |
---|---|
import | import modules in required scripts |
params | import params in required scripts. It can be any variable name. Params in loader === var params = {ip:'0.0.0.0'} in file witch require |
The following characters have special magic meaning when used in a path portion:
*
Matches 0 or more characters in a single path portion?
Matches 1 character[...]
Matches a range of characters, similar to a RegExp range.
If the first character of the range is !
or ^
then it matches
any character not in the range.!(pattern|pattern|pattern)
Matches anything that does not match
any of the patterns provided.?(pattern|pattern|pattern)
Matches zero or one occurrence of the
patterns provided.+(pattern|pattern|pattern)
Matches one or more occurrences of the
patterns provided.*(a|b|c)
Matches zero or more occurrences of the patterns provided@(pattern|pat*|pat?erN)
Matches exactly one of the patterns
providedNo vulnerabilities found.
No security vulnerabilities found.