Skip to content

Commit 97d0ca5

Browse files
committed
Ported StringFormatter from old project and created some tests.
Configured: - Dependencies - TypeScript - Gulp
1 parent a2c8317 commit 97d0ca5

11 files changed

+5692
-0
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Jetbrains IDE
2+
.idea
3+
14
# Logs
25
logs
36
*.log

.npmignore

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.github
2+
src
3+
test
4+
gulpfile.js
5+
tsconfig.json
6+
.travis.yml
7+
.gitignore
8+
.idea
9+
.iml
10+
.vscode
11+
.directory
12+
.DS_Store
13+
Thumbs.db

gulpfile.js

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
"use strict";
2+
3+
const gulp = require("gulp");
4+
const gulpTypescript = require("gulp-typescript");
5+
const del = require("del");
6+
7+
const typescriptProject = gulpTypescript.createProject("tsconfig.json", {
8+
removeComments: true
9+
});
10+
const typescriptDeclarationProject = gulpTypescript.createProject("tsconfig.json", {
11+
declaration: true,
12+
noResolve: false,
13+
emitDeclarationOnly: true,
14+
removeComments: false
15+
});
16+
17+
function clean() {
18+
19+
return del(["dist"]);
20+
}
21+
22+
function build() {
23+
24+
return gulp.src(["src/**/*.ts", "!src/**/*.spec.ts"])
25+
.pipe(typescriptProject())
26+
.on("error", function(err) {
27+
console.error(err);
28+
process.exit(1);
29+
})
30+
.pipe(gulp.dest("dist"));
31+
}
32+
33+
function buildDeclaration() {
34+
35+
return gulp.src(["src/**/*.ts", "!src/**/*.spec.ts"])
36+
.pipe(typescriptDeclarationProject())
37+
.on("error", function(err) {
38+
console.error(err);
39+
process.exit(1);
40+
})
41+
.pipe(gulp.dest("dist"));
42+
}
43+
44+
const buildTask = gulp.series(clean, build, buildDeclaration);
45+
46+
exports.default = buildTask;

0 commit comments

Comments
 (0)