Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
0f5e451e60 | |||
3595bf3590 |
17
dist/mod02/index.js
vendored
17
dist/mod02/index.js
vendored
@ -30,15 +30,6 @@ let tap = function (configArg) {
|
|||||||
*/
|
*/
|
||||||
let testableFilesSmartstream = new plugins.smartstream.Smartstream([
|
let testableFilesSmartstream = new plugins.smartstream.Smartstream([
|
||||||
plugins.smartgulp.src([plugins.path.join(paths.cwd, './ts/**/*.ts')]),
|
plugins.smartgulp.src([plugins.path.join(paths.cwd, './ts/**/*.ts')]),
|
||||||
plugins.gulpFunction.forEach((fileArg) => __awaiter(this, void 0, void 0, function* () {
|
|
||||||
let stringToModify = fileArg.contents.toString();
|
|
||||||
let testRegex = /\/\/\smodule\stestimport\nimport[a-zA-Z0-9\*\s]*\sfrom\s'(..\/ts\/index)'/;
|
|
||||||
let replacer = (match, group1, offset, completeString) => {
|
|
||||||
return match.replace(group1, '../dist/index');
|
|
||||||
};
|
|
||||||
fileArg.setContentsFromString(stringToModify.replace(testRegex, replacer));
|
|
||||||
return fileArg;
|
|
||||||
})),
|
|
||||||
plugins.gulpSourcemaps.init(),
|
plugins.gulpSourcemaps.init(),
|
||||||
plugins.gulpTypeScript({
|
plugins.gulpTypeScript({
|
||||||
target: 'ES5',
|
target: 'ES5',
|
||||||
@ -58,6 +49,14 @@ let tap = function (configArg) {
|
|||||||
*/
|
*/
|
||||||
let testFilesSmartstream = new plugins.smartstream.Smartstream([
|
let testFilesSmartstream = new plugins.smartstream.Smartstream([
|
||||||
plugins.smartgulp.src([plugins.path.join(paths.cwd, 'test/*.ts')]),
|
plugins.smartgulp.src([plugins.path.join(paths.cwd, 'test/*.ts')]),
|
||||||
|
plugins.gulpFunction.forEach((fileArg) => __awaiter(this, void 0, void 0, function* () {
|
||||||
|
let stringToModify = fileArg.contents.toString();
|
||||||
|
let testRegex = /\/\/\smodule\stestimport\nimport[a-zA-Z0-9\*\s]*\sfrom\s'(..\/ts\/index)'/;
|
||||||
|
let replacer = (match, group1, offset, completeString) => {
|
||||||
|
return match.replace(group1, '../dist/index');
|
||||||
|
};
|
||||||
|
fileArg.contents = Buffer.from(stringToModify.replace(testRegex, replacer));
|
||||||
|
})),
|
||||||
plugins.gulpSourcemaps.init(),
|
plugins.gulpSourcemaps.init(),
|
||||||
plugins.gulpTypeScript({
|
plugins.gulpTypeScript({
|
||||||
target: 'ES5',
|
target: 'ES5',
|
||||||
|
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "npmts",
|
"name": "npmts",
|
||||||
"version": "7.2.9",
|
"version": "7.2.10",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@gulp-sourcemaps/identity-map": {
|
"@gulp-sourcemaps/identity-map": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "npmts",
|
"name": "npmts",
|
||||||
"version": "7.2.9",
|
"version": "7.2.10",
|
||||||
"description": "Write npm modules with TypeScript without hassle. TypeScript ready. Fully ES6.",
|
"description": "Write npm modules with TypeScript without hassle. TypeScript ready. Fully ES6.",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
@ -29,15 +29,6 @@ let tap = function (configArg: INpmtsConfig) {
|
|||||||
*/
|
*/
|
||||||
let testableFilesSmartstream = new plugins.smartstream.Smartstream([
|
let testableFilesSmartstream = new plugins.smartstream.Smartstream([
|
||||||
plugins.smartgulp.src([ plugins.path.join(paths.cwd, './ts/**/*.ts') ]),
|
plugins.smartgulp.src([ plugins.path.join(paths.cwd, './ts/**/*.ts') ]),
|
||||||
plugins.gulpFunction.forEach(async (fileArg: Smartfile) => {
|
|
||||||
let stringToModify = fileArg.contents.toString()
|
|
||||||
let testRegex = /\/\/\smodule\stestimport\nimport[a-zA-Z0-9\*\s]*\sfrom\s'(..\/ts\/index)'/
|
|
||||||
let replacer = (match, group1, offset, completeString: string) => {
|
|
||||||
return match.replace(group1, '../dist/index')
|
|
||||||
}
|
|
||||||
fileArg.setContentsFromString(stringToModify.replace(testRegex, replacer))
|
|
||||||
return fileArg
|
|
||||||
}),
|
|
||||||
plugins.gulpSourcemaps.init(),
|
plugins.gulpSourcemaps.init(),
|
||||||
plugins.gulpTypeScript({
|
plugins.gulpTypeScript({
|
||||||
target: 'ES5',
|
target: 'ES5',
|
||||||
@ -58,6 +49,14 @@ let tap = function (configArg: INpmtsConfig) {
|
|||||||
*/
|
*/
|
||||||
let testFilesSmartstream = new plugins.smartstream.Smartstream([
|
let testFilesSmartstream = new plugins.smartstream.Smartstream([
|
||||||
plugins.smartgulp.src([ plugins.path.join(paths.cwd, 'test/*.ts') ]),
|
plugins.smartgulp.src([ plugins.path.join(paths.cwd, 'test/*.ts') ]),
|
||||||
|
plugins.gulpFunction.forEach(async (fileArg: Smartfile) => {
|
||||||
|
let stringToModify = fileArg.contents.toString()
|
||||||
|
let testRegex = /\/\/\smodule\stestimport\nimport[a-zA-Z0-9\*\s]*\sfrom\s'(..\/ts\/index)'/
|
||||||
|
let replacer = (match: string, group1: string, offset: number, completeString: string) => {
|
||||||
|
return match.replace(group1, '../dist/index')
|
||||||
|
}
|
||||||
|
fileArg.contents = Buffer.from(stringToModify.replace(testRegex, replacer))
|
||||||
|
}),
|
||||||
plugins.gulpSourcemaps.init(),
|
plugins.gulpSourcemaps.init(),
|
||||||
plugins.gulpTypeScript({
|
plugins.gulpTypeScript({
|
||||||
target: 'ES5',
|
target: 'ES5',
|
||||||
|
Reference in New Issue
Block a user