提交 dbc1bc9d 编写于 作者: fxy060608's avatar fxy060608

build(deps): bump preprocess from 3.1.0 to 3.2.0

上级 7ab8af11
module.exports = { module.exports = {
simple: { simple : {
echo: '^#echo[ \t]+(.*?)[ \t]*$', echo : "^#echo[ \t]+(.*?)[ \t]*$",
exec: '^#exec[ \t]+(\\S+)[ \t]*\\((.*)\\)[ \t]*$', exec : "^#exec[ \t]+(\\S+)[ \t]*\\((.*)\\)[ \t]*$",
include: '^(.*)#include(?!-)[ \t]+(.*?)[ \t]*$', // allow prefix characters to specify the indent level of included file include : "^(.*)#include(?!-)[ \t]+(.*?)[ \t]*$", // allow prefix characters to specify the indent level of included file
'include-static': '^(.*)#include-static[ \t]+(.*?)[ \t]*$' 'include-static' : "^(.*)#include-static[ \t]+(.*?)[ \t]*$"
}, },
html: { html : {
echo: '<!--[ \t]*#echo[ \t]+(.*?)[ \t]*(?:-->|!>)', echo : "<!--[ \t]*#echo[ \t]+(.*?)[ \t]*(?:-->|!>)",
exec: '<!--[ \t]*#exec[ \t]+(\\S+)[ \t]*\\((.*)\\)[ \t]*(?:-->|!>)', exec : "<!--[ \t]*#exec[ \t]+(\\S+)[ \t]*\\((.*)\\)[ \t]*(?:-->|!>)",
include: '(.*)<!--[ \t]*#include(?!-)[ \t]+(.*?)[ \t]*(?:-->|!>)', include : "(.*)<!--[ \t]*#include(?!-)[ \t]+(.*?)[ \t]*(?:-->|!>)",
'include-static': 'include-static' : "(.*)<!--[ \t]*#include-static[ \t]+(.*?)[ \t]*(?:-->|!>)",
'(.*)<!--[ \t]*#include-static[ \t]+(.*?)[ \t]*(?:-->|!>)', exclude : {
exclude: { start : "[ \t]*<!--[ \t]*#exclude(?:[ \t]+(.*?))?[ \t]*(?:-->|!>)(?:[ \t]*\n+)?",
start: end : "[ \t]*<!--[ \t]*#endexclude[ \t]*(?:-->|!>)(?:[ \t]*\n)?"
'[ \t]*<!--[ \t]*#exclude(?:[ \t]+(.*?))?[ \t]*(?:-->|!>)(?:[ \t]*\n+)?',
end: '[ \t]*<!--[ \t]*#endexclude[ \t]*(?:-->|!>)(?:[ \t]*\n)?'
}, },
extend: { extend : {
start: start : "[ \t]*<!--[ \t]*#extend(?!able)[ \t]+(.*?)[ \t]*(?:-->|!>)(?:[ \t]*\n+)?",
'[ \t]*<!--[ \t]*#extend(?!able)[ \t]+(.*?)[ \t]*(?:-->|!>)(?:[ \t]*\n+)?', end : "[ \t]*<!--[ \t]*#endextend[ \t]*(?:-->|!>)(?:[ \t]*\n)?"
end: '[ \t]*<!--[ \t]*#endextend[ \t]*(?:-->|!>)(?:[ \t]*\n)?'
}, },
extendable: '<!--[ \t]*#extendable[ \t]*(?:-->|!>)', extendable : "<!--[ \t]*#extendable[ \t]*(?:-->|!>)",
if: { if : {
start: start : "[ \t]*<!--[ \t]*#(ifndef|ifdef|if)[ \t]+(.*?)[ \t]*(?:-->|!>)(?:[ \t]*\n+)?",
'[ \t]*<!--[ \t]*#(ifndef|ifdef|if)[ \t]+(.*?)[ \t]*(?:-->|!>)(?:[ \t]*\n+)?', end : "[ \t]*<!(?:--)?[ \t]*#endif[ \t]*(?:-->|!>)(?:[ \t]*\n)?"
end: '[ \t]*<!(?:--)?[ \t]*#endif[ \t]*(?:-->|!>)(?:[ \t]*\n)?'
}, },
foreach: { else : "[ \t]*<!(?:--)?[ \t]*#else[ \t]*(?:-->|!>)(?:[ \t]*\n)?",
start: foreach : {
'[ \t]*<!--[ \t]*#foreach[ \t]+(.*?)[ \t]*(?:-->|!>)(?:[ \t]*\n+)?', start : "[ \t]*<!--[ \t]*#foreach[ \t]+(.*?)[ \t]*(?:-->|!>)(?:[ \t]*\n+)?",
end: '[ \t]*<!(?:--)?[ \t]*#endfor[ \t]*(?:-->|!>)(?:[ \t]*\n)?' end : "[ \t]*<!(?:--)?[ \t]*#endfor[ \t]*(?:-->|!>)(?:[ \t]*\n)?"
} }
}, },
js: { js : {
echo: [ echo : [
'/\\*[ \t]*#echo[ \t]+(.*?)[ \t]*\\*(?:\\*|/)', "/\\*[ \t]*#echo[ \t]+(.*?)[ \t]*\\*(?:\\*|/)",
'//[ \t]*#echo[ \t]+(.*?)[ \t]*$' "//[ \t]*#echo[ \t]+(.*?)[ \t]*$"
], ],
exec: exec : "(?://|/\\*)[ \t]*#exec[ \t]+(\\S+?)[ \t]*\\((.*)\\)[ \t]*(?:\\*(?:\\*|/))?",
'(?://|/\\*)[ \t]*#exec[ \t]+(\\S+)[ \t]*\\((.*)\\)[ \t]*(?:\\*(?:\\*|/))?', include : [
include: [ "^(.*)/\\*[ \t]*#include(?!-)[ \t]+(.*?)[ \t]*\\*(?:\\*|/)",
'^(.*)/\\*[ \t]*#include(?!-)[ \t]+(.*?)[ \t]*\\*(?:\\*|/)', "^(.*)//[ \t]*#include(?!-)[ \t]+(.*?)[ \t]*$"
'^(.*)//[ \t]*#include(?!-)[ \t]+(.*?)[ \t]*$'
], ],
'include-static': [ 'include-static': [
'^(.*)/\\*[ \t]*#include-static[ \t]+(.*?)[ \t]*\\*(?:\\*|/)', "^(.*)/\\*[ \t]*#include-static[ \t]+(.*?)[ \t]*\\*(?:\\*|/)",
'^(.*)//[ \t]*#include-static[ \t]+(.*?)[ \t]*$' "^(.*)//[ \t]*#include-static[ \t]+(.*?)[ \t]*$"
], ],
exclude: { exclude : {
start: start : "[ \t]*(?://|/\\*)[ \t]*#exclude(?:[ \t]+([^\n*]*))?[ \t]*(?:\\*(?:\\*|/))?(?:[ \t]*\n+)?",
'[ \t]*(?://|/\\*)[ \t]*#exclude(?:[ \t]+([^\n*]*))?[ \t]*(?:\\*(?:\\*|/))?(?:[ \t]*\n+)?', end : "[ \t]*(?://|/\\*)[ \t]*#endexclude[ \t]*(?:\\*(?:\\*|/))?(?:[ \t]*\n)?"
end:
'[ \t]*(?://|/\\*)[ \t]*#endexclude[ \t]*(?:\\*(?:\\*|/))?(?:[ \t]*\n)?'
}, },
extend: { extend : {
start: start : "[ \t]*(?://|/\\*)[ \t]*#extend(?!able)[ \t]+([^\n*]*)(?:\\*(?:\\*|/))?(?:[ \t]*\n+)?",
'[ \t]*(?://|/\\*)[ \t]*#extend(?!able)[ \t]+([^\n*]*)(?:\\*(?:\\*|/))?(?:[ \t]*\n+)?', end : "[ \t]*(?://|/\\*)[ \t]*#endextend[ \t]*(?:\\*(?:\\*|/))?(?:[ \t]*\n)?"
end:
'[ \t]*(?://|/\\*)[ \t]*#endextend[ \t]*(?:\\*(?:\\*|/))?(?:[ \t]*\n)?'
}, },
extendable: '[ \t]*(?://|/\\*)[ \t]*#extendable[ \t]*(?:\\*/)?', extendable : "[ \t]*(?://|/\\*)[ \t]*#extendable[ \t]*(?:\\*/)?",
if: { if : {
start: start : "[ \t]*(?://|/\\*)[ \t]*#(ifndef|ifdef|if)[ \t]+([^\n*]*)(?:\\*(?:\\*|/))?(?:[ \t]*\n+)?",
'[ \t]*(?://|/\\*)[ \t]*#(ifndef|ifdef|if)[ \t]+([^\n*]*)(?:\\*(?:\\*|/))?(?:[ \t]*\n+)?', end : "[ \t]*(?://|/\\*)[ \t]*#endif[ \t]*(?:\\*(?:\\*|/))?(?:[ \t]*\n)?"
end: '[ \t]*(?://|/\\*)[ \t]*#endif[ \t]*(?:\\*(?:\\*|/))?(?:[ \t]*\n)?'
}, },
foreach: { else : "[ \t]*(?://|/\\*)[ \t]*#else[ \t]*(?:\\*(?:\\*|/))?(?:[ \t]*\n)?",
start: foreach : {
'[ \t]*(?://|/\\*)[ \t]*#foreach[ \t]+([^\n*]*)(?:\\*(?:\\*|/))?(?:[ \t]*\n+)?', start : "[ \t]*(?://|/\\*)[ \t]*#foreach[ \t]+([^\n*]*)(?:\\*(?:\\*|/))?(?:[ \t]*\n+)?",
end: '[ \t]*(?://|/\\*)[ \t]*#endfor[ \t]*(?:\\*(?:\\*|/))?(?:[ \t]*\n)?' end : "[ \t]*(?://|/\\*)[ \t]*#endfor[ \t]*(?:\\*(?:\\*|/))?(?:[ \t]*\n)?"
} }
}, },
coffee: { coffee : {
echo: '#+[ \t]*@echo[ \t]+(.*?)[ \t]*$', echo : [
exec: '#+[ \t]*@exec[ \t]+(\\S+)[ \t]*\\((.*)\\)[ \t]*$', "###+[ \t]*#echo[ \t]+(.*?)[ \t]###",
include: '^(.*?)#+[ \t]*@include(?!-)[ \t]+(.*?)[ \t]*$', "#+[ \t]*#echo[ \t]+(.*?)[ \t]*$"
'include-static': '^(.*?)#+[ \t]*@include-static[ \t]+(.*?)[ \t]*$', ],
exclude: { exec : "#+[ \t]*#exec[ \t]+(\\S+)[ \t]*\\((.*)\\)[ \t]*$",
start: '^[ \t]*#+[ \t]*@exclude(?:[ \t]+(.*?))?[ \t]*\n+', include : "^(.*?)#+[ \t]*#include(?!-)[ \t]+(.*?)[ \t]*$",
end: '^[ \t]*#+[ \t]*@endexclude[ \t]*\n?' 'include-static' : "^(.*?)#+[ \t]*#include-static[ \t]+(.*?)[ \t]*$",
exclude : {
start : "^[ \t]*#+[ \t]*#exclude(?:[ \t]+(.*?))?[ \t]*\n+",
end : "^[ \t]*#+[ \t]*#endexclude[ \t]*\n?"
}, },
extend: { extend : {
start: '^[ \t]*#+[ \t]*@extend(?!able)[ \t]+(.*?)\n+', start : "^[ \t]*#+[ \t]*#extend(?!able)[ \t]+(.*?)\n+",
end: '^[ \t]*#+[ \t]*@endextend[ \t]*\n?' end : "^[ \t]*#+[ \t]*#endextend[ \t]*\n?"
}, },
extendable: '^[ \t]*#+[ \t]*@extendable[ \t]*$', extendable : "^[ \t]*#+[ \t]*#extendable[ \t]*$",
if: { if : {
start: '^[ \t]*#+[ \t]*@(ifndef|ifdef|if)[ \t]+(.*?)[ \t]*\n+', start : "^[ \t]*#+[ \t]*#(ifndef|ifdef|if)[ \t]+(.*?)[ \t]*\n+",
end: '^[ \t]*#+[ \t]*@endif[ \t]*\n?' end : "^[ \t]*#+[ \t]*#endif[ \t]*\n?"
}, },
foreach: { else : "^[ \t]*#+[ \t]*#else[ \t]*\n?",
start: '^[ \t]*#+[ \t]*@foreach[ \t]+(.*?)[ \t]*\n+', foreach : {
end: '^[ \t]*#+[ \t]*@endfor[ \t]*\n?' start : "^[ \t]*#+[ \t]*#foreach[ \t]+(.*?)[ \t]*\n+",
end : "^[ \t]*#+[ \t]*#endfor[ \t]*\n?"
} }
} }
} };
module.exports.xml = module.exports.html module.exports.xml = module.exports.html;
module.exports.javascript = module.exports.js module.exports.javascript = module.exports.js;
module.exports.jsx = module.exports.js module.exports.jsx = module.exports.js;
module.exports.c = module.exports.js module.exports.json = module.exports.js;
module.exports.cc = module.exports.js module.exports.c = module.exports.js;
module.exports.cpp = module.exports.js module.exports.cc = module.exports.js;
module.exports.cs = module.exports.js module.exports.cpp = module.exports.js;
module.exports.csharp = module.exports.js module.exports.cs = module.exports.js;
module.exports.java = module.exports.js module.exports.csharp = module.exports.js;
module.exports.less = module.exports.js module.exports.java = module.exports.js;
module.exports.sass = module.exports.js module.exports.less = module.exports.js;
module.exports.scss = module.exports.js module.exports.sass = module.exports.js;
module.exports.css = module.exports.js module.exports.scss = module.exports.js;
module.exports.php = module.exports.js module.exports.css = module.exports.js;
module.exports.ts = module.exports.js module.exports.php = module.exports.js;
module.exports.tsx = module.exports.js module.exports.ts = module.exports.js;
module.exports.peg = module.exports.js module.exports.tsx = module.exports.js;
module.exports.pegjs = module.exports.js module.exports.peg = module.exports.js;
module.exports.jade = module.exports.js module.exports.pegjs = module.exports.js;
module.exports.styl = module.exports.js module.exports.jade = module.exports.js;
module.exports.go = module.exports.js module.exports.styl = module.exports.js;
module.exports.go = module.exports.js;
module.exports.bash = module.exports.coffee module.exports.bash = module.exports.coffee;
module.exports.shell = module.exports.coffee module.exports.shell = module.exports.coffee;
module.exports.sh = module.exports.coffee module.exports.sh = module.exports.coffee;
{ {
"name": "preprocess", "name": "preprocess",
"description": "Preprocess directives in HTML, JavaScript, etc directives based off variable context", "description": "Preprocess directives in HTML, JavaScript, etc directives based off variable context",
"version": "3.1.0", "version": "3.2.0",
"homepage": "https://github.com/jsoverson/preprocess", "homepage": "https://github.com/jsoverson/preprocess",
"author": { "author": {
"name": "Jarrod Overson", "name": "Jarrod Overson",
......
...@@ -19,8 +19,8 @@ export const main = { ...@@ -19,8 +19,8 @@ export const main = {
if (!pagesJsPath) { if (!pagesJsPath) {
pagesJsPath = slash(path.resolve(options.inputDir, 'pages.json.js')) pagesJsPath = slash(path.resolve(options.inputDir, 'pages.json.js'))
} }
return `import '${pagesJsPath}'; return `import '${pagesJsPath}';${fs
${fs.readFileSync(filename, 'utf-8').toString()} .readFileSync(filename, 'utf-8')
` .toString()}`
}, },
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册