<commit_before>const gulp = require("gulp");
const interDir = "./inter";
const distDir = "./dist";

// ------------ makealias ------------
const makealias = require("./makealias");
gulp.task("makealias", function(){
	return makealias("src/resource", "resource", "src/_alias.ts");
});
gulp.task("makealias-f", function(){
	return makealias("src/fragile/resource", "fragile/resource", "src/fragile/_alias.ts");
});
gulp.task("makealiases", ["makealias", "makealias-f"], function(){});

// ----------------- typescript -----------------
const ts = require("gulp-typescript");
const tsConfig = require("./tsconfig.json");
const tsProj = ts.createProject(tsConfig.compilerOptions);

const tssrc = ["src/**/*.ts", "src/**/*/*.ts"];
gulp.task("ts", ["makealiases"], function(){
	return gulp.src(tssrc)
	.pipe(tsProj())
	.pipe(gulp.dest(interDir));
});
// ----------------- typescript-watch -----------------
gulp.task("watch", function(){
	gulp.watch(tssrc, ["ts"]);
});

// ----------------- rollup -----------------
const rollup = require("gulp-rollup");
const buble = require("rollup-plugin-buble");
const uglify = require("rollup-plugin-uglify");
const babel = require("rollup-plugin-babel");
const incpath = require("rollup-plugin-includepaths");
const rollup_plugins_incpath =
	incpath(
		{
			paths: ["inter/fragile"]
		}
	);

const jssrc = "./inter/**/*.js";
const jssrc_main = "./inter/main.js";
const rollup_plugins_buble =
	buble(
		{
			chrome: 42,
			node: 4,
			firefox: 45,
			safari: 9,
			edge: 12,
			ie: 11
		}
	);
const rollup_plugins_uglify = uglify();
const rollup_plugins_babel = babel({
	presets: ["es2015-rollup"]
});
const rollup_pipe = function(plugins) {
	return rollup({
		entry: jssrc_main,
		format: "iife",
		plugins: plugins.concat([rollup_plugins_incpath]),
		allowRealFiles: true
	});
};
gulp.task("rollup", ["ts"], function(){
	gulp.src(jssrc_main)
			.pipe(rollup_pipe([]))
			.pipe(gulp.dest(distDir));
});
gulp.task("rollup-b", ["ts"], function(){
	gulp.src(jssrc)
			.pipe(rollup_pipe([rollup_plugins_buble]))
			.pipe(gulp.dest(distDir));
});
gulp.task("rollup-bu", ["ts"], function(){
	gulp.src(jssrc)
			.pipe(rollup_pipe([
				rollup_plugins_buble,
				rollup_plugins_uglify
			]))
			.pipe(gulp.dest(distDir));
});
gulp.task("rollup-a", ["ts"], function(){
	gulp.src(jssrc)
			.pipe(rollup_pipe([
				rollup_plugins_babel
			]))
			.pipe(gulp.dest(distDir));
});

// ------------ glslify ------------
const glslsrc = ["src/**/resource/*.{vsh,fsh}", "src/**/fragile/resource/*.{vsh,fsh}"];
const glslify = require("gulp-glslify");
gulp.task("glslify", function(){
	gulp.src(glslsrc)
		.pipe(glslify())
		.pipe(gulp.dest("./dist"));
});

gulp.task("package", ["rollup", "glslify"]);

// ------------ deployスクリプトの実行 ------------
const shell = require("gulp-shell");
gulp.task("deploy", ["package"], function(){
	return gulp.src("./deploy.sh")
			.pipe(shell([
				"<%= file.path %>"
			]));
});

gulp.task("default", ["package"]);<commit_msg>中間ディレクトリを変数に格納<commit_after>const gulp = require("gulp");
const srcDir = "./src";
const interDir = "./inter";
const distDir = "./dist";

// ------------ makealias ------------
const makealias = require("./makealias");
gulp.task("makealias", function(){
	return makealias(srcDir+"/resource", "resource", srcDir+"/_alias.ts");
});
gulp.task("makealias-f", function(){
	return makealias(srcDir+"/fragile/resource", "fragile/resource", srcDir+"/fragile/_alias.ts");
});
gulp.task("makealiases", ["makealias", "makealias-f"], function(){});

// ----------------- typescript -----------------
const ts = require("gulp-typescript");
const tsConfig = require("./tsconfig.json");
const tsProj = ts.createProject(tsConfig.compilerOptions);

const tssrc = [srcDir+"/**/*.ts", srcDir+"/**/*/*.ts"];
gulp.task("ts", ["makealiases"], function(){
	return gulp.src(tssrc)
		.pipe(tsProj())
		.pipe(gulp.dest(interDir));
});
// ----------------- typescript-watch -----------------
gulp.task("watch", function(){
	gulp.watch(tssrc, ["ts"]);
});

// ----------------- rollup -----------------
const rollup = require("gulp-rollup");
const buble = require("rollup-plugin-buble");
const uglify = require("rollup-plugin-uglify");
const babel = require("rollup-plugin-babel");
const incpath = require("rollup-plugin-includepaths");
const rollup_plugins_incpath =
	incpath(
		{
			paths: [interDir + "/fragile"]
		}
	);

const jssrc = interDir + "/**/*.js";
const jssrc_main = interDir + "/main.js";
const rollup_plugins_buble =
	buble(
		{
			chrome: 42,
			node: 4,
			firefox: 45,
			safari: 9,
			edge: 12,
			ie: 11
		}
	);
const rollup_plugins_uglify = uglify();
const rollup_plugins_babel = babel({
	presets: ["es2015-rollup"]
});
const rollup_pipe = function(plugins) {
	return rollup({
		entry: jssrc_main,
		format: "iife",
		plugins: plugins.concat([rollup_plugins_incpath]),
		allowRealFiles: true
	});
};
gulp.task("rollup", ["ts"], function(){
	gulp.src(jssrc_main)
		.pipe(rollup_pipe([]))
		.pipe(gulp.dest(distDir));
});
gulp.task("rollup-b", ["ts"], function(){
	gulp.src(jssrc)
		.pipe(rollup_pipe([rollup_plugins_buble]))
		.pipe(gulp.dest(distDir));
});
gulp.task("rollup-bu", ["ts"], function(){
	gulp.src(jssrc)
		.pipe(rollup_pipe([
			rollup_plugins_buble,
			rollup_plugins_uglify
		]))
		.pipe(gulp.dest(distDir));
});
gulp.task("rollup-a", ["ts"], function(){
	gulp.src(jssrc)
		.pipe(rollup_pipe([
			rollup_plugins_babel
		]))
		.pipe(gulp.dest(distDir));
});

// ------------ glslify ------------
const glslsrc = [srcDir+"/**/resource/*.{vsh,fsh}", srcDir+"/**/fragile/resource/*.{vsh,fsh}"];
const glslify = require("gulp-glslify");
gulp.task("glslify", function(){
	gulp.src(glslsrc)
		.pipe(glslify())
		.pipe(gulp.dest(distDir));
});

gulp.task("package", ["rollup", "glslify"]);

// ------------ deployスクリプトの実行 ------------
const shell = require("gulp-shell");
gulp.task("deploy", ["package"], function(){
	return gulp.src("./deploy.sh")
		.pipe(shell([
			"<%= file.path %>"
		]));
});

gulp.task("default", ["package"]);
{'fraction_non_alphanumeric': 0.2643926788685524, 'fraction_numerical': 0.004658901830282862, 'mean_word_length': 3.5920550038197097, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5484066', 'n_tokens_mistral': 2359, 'n_tokens_neox': 2209, 'n_words': 353}