added typescript regec section
This commit is contained in:
parent
0a6724d80e
commit
2db9ba50d2
6
dist/index.js
vendored
6
dist/index.js
vendored
@ -2,10 +2,12 @@
|
|||||||
/// <reference path="./typings/main.d.ts" />
|
/// <reference path="./typings/main.d.ts" />
|
||||||
var SmartstringGit = require("./smartstring.git");
|
var SmartstringGit = require("./smartstring.git");
|
||||||
var SmartstringDocker = require("./smartstring.docker");
|
var SmartstringDocker = require("./smartstring.docker");
|
||||||
|
var SmartstringTypescript = require("./smartstring.typescript");
|
||||||
var smartstring = {
|
var smartstring = {
|
||||||
git: SmartstringGit,
|
git: SmartstringGit,
|
||||||
docker: SmartstringDocker
|
docker: SmartstringDocker,
|
||||||
|
typescript: SmartstringTypescript
|
||||||
};
|
};
|
||||||
module.exports = smartstring;
|
module.exports = smartstring;
|
||||||
|
|
||||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSw0Q0FBNEM7QUFDNUMsSUFBTyxjQUFjLFdBQVcsbUJBQW1CLENBQUMsQ0FBQztBQUNyRCxJQUFPLGlCQUFpQixXQUFXLHNCQUFzQixDQUFDLENBQUM7QUFFM0QsSUFBSSxXQUFXLEdBQUc7SUFDZCxHQUFHLEVBQUcsY0FBYztJQUNwQixNQUFNLEVBQUUsaUJBQWlCO0NBQzVCLENBQUM7QUFFRixpQkFBUyxXQUFXLENBQUMiLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLy8gPHJlZmVyZW5jZSBwYXRoPVwiLi90eXBpbmdzL21haW4uZC50c1wiIC8+XG5pbXBvcnQgU21hcnRzdHJpbmdHaXQgPSByZXF1aXJlKFwiLi9zbWFydHN0cmluZy5naXRcIik7XG5pbXBvcnQgU21hcnRzdHJpbmdEb2NrZXIgPSByZXF1aXJlKFwiLi9zbWFydHN0cmluZy5kb2NrZXJcIik7XG5cbm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dHJpbmdEb2NrZXIsXG4gICAgdHlwZXNjcmlwdDogU21hcnRzdHJpbmdUeXBlc2NyaXB0XG59O1xuXG5leHBvcnQgPSBzbWFydHN0cmluZzsiXSwic291cmNlUm9vdCI6Ii9zb3VyY2UvIn0=
|
||||||
|
4
dist/smartstring.typescript.js
vendored
Normal file
4
dist/smartstring.typescript.js
vendored
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
"use strict";
|
||||||
|
exports.regexReferencePath = /\/\/\/\s*<reference\s+path\s*=\s*["|'].*["|']\s*\/>\s*[\\n]?/;
|
||||||
|
|
||||||
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNtYXJ0c3RyaW5nLnR5cGVzY3JpcHQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUVXLDBCQUFrQixHQUFHLDhEQUE4RCxDQUFBIiwiZmlsZSI6InNtYXJ0c3RyaW5nLnR5cGVzY3JpcHQuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgcGx1Z2lucyA9IHJlcXVpcmUoXCIuL3NtYXJ0c3RyaW5nLnBsdWdpbnNcIik7XG5cbmV4cG9ydCBsZXQgcmVnZXhSZWZlcmVuY2VQYXRoID0gL1xcL1xcL1xcL1xccyo8cmVmZXJlbmNlXFxzK3BhdGhcXHMqPVxccypbXCJ8J10uKltcInwnXVxccypcXC8+XFxzKltcXFxcbl0/LyJdLCJzb3VyY2VSb290IjoiL3NvdXJjZS8ifQ==
|
14
test/test.js
14
test/test.js
File diff suppressed because one or more lines are too long
12
test/test.ts
12
test/test.ts
@ -36,4 +36,16 @@ describe("smartstring",function(){
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
describe(".typescript",function(){
|
||||||
|
describe(".referenceRegex",function(){
|
||||||
|
it("should match reference paths",function(){
|
||||||
|
smartstring.typescript.regexReferencePath.test("/// <reference path=\"\" />")
|
||||||
|
.should.be.true();
|
||||||
|
smartstring.typescript.regexReferencePath.test("/// <reference path='' />")
|
||||||
|
.should.be.true();
|
||||||
|
smartstring.typescript.regexReferencePath.test("/// <referencepath=\"\" />")
|
||||||
|
.should.be.false();
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
||||||
});
|
});
|
@ -1,10 +1,12 @@
|
|||||||
/// <reference path="./typings/main.d.ts" />
|
/// <reference path="./typings/main.d.ts" />
|
||||||
import SmartstringGit = require("./smartstring.git");
|
import SmartstringGit = require("./smartstring.git");
|
||||||
import SmartstringDocker = require("./smartstring.docker");
|
import SmartstringDocker = require("./smartstring.docker");
|
||||||
|
import SmartstringTypescript = require("./smartstring.typescript");
|
||||||
|
|
||||||
let smartstring = {
|
let smartstring = {
|
||||||
git : SmartstringGit,
|
git : SmartstringGit,
|
||||||
docker: SmartstringDocker
|
docker: SmartstringDocker,
|
||||||
|
typescript: SmartstringTypescript
|
||||||
};
|
};
|
||||||
|
|
||||||
export = smartstring;
|
export = smartstring;
|
3
ts/smartstring.typescript.ts
Normal file
3
ts/smartstring.typescript.ts
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
import plugins = require("./smartstring.plugins");
|
||||||
|
|
||||||
|
export let regexReferencePath = /\/\/\/\s*<reference\s+path\s*=\s*["|'].*["|']\s*\/>\s*[\\n]?/
|
Loading…
Reference in New Issue
Block a user