using gulp transpiling

This commit is contained in:
andy 2021-10-19 22:25:47 +01:00
parent 95e93f91f7
commit 4d0f3bc9b5
10 changed files with 3728 additions and 1184 deletions

View File

@ -1 +0,0 @@
console.log("Hello World");

File diff suppressed because it is too large Load Diff

View File

@ -1,13 +0,0 @@
{
"compilerOptions": {
"outDir": "../wwwroot/",
"sourceMap": true,
"noImplicitAny": true,
"module": "es6",
"target": "es5",
"jsx": "react",
"allowJs": true,
"moduleResolution": "node",
// "declaration": true
}
}

View File

@ -1,23 +0,0 @@
const path = require('path');
module.exports = {
entry: './index.ts',
devtool: 'inline-source-map',
mode: 'development',
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/,
}
]
},
resolve: {
extensions: [".js", '.tsx', '.ts']
},
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, '..', 'wwwroot'),
}
};

View File

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
@ -11,11 +11,15 @@
</ItemGroup>
<ItemGroup>
<Compile Remove="Frontend\**" />
<Content Remove="Frontend\**" />
<Content Remove="wwwroot\**\*" />
<EmbeddedResource Remove="Frontend\**" />
<None Remove="Frontend\**" />
<PackageReference Include="Microsoft.AspNetCore.StaticFiles" Version="2.2.0" />
<PackageReference Include="Microsoft.TypeScript.MSBuild" Version="4.4.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Folder Include="wwwroot\" />
</ItemGroup>
</Project>

21
Selector.Web/gulpfile.js Normal file
View File

@ -0,0 +1,21 @@
/// <binding AfterBuild='default' Clean='clean' />
/*
This file is the main entry point for defining Gulp tasks and using Gulp plugins.
Click here to learn more. http://go.microsoft.com/fwlink/?LinkId=518007
*/
var gulp = require("gulp");
var del = require("del");
var paths = {
scripts: ["scripts/**/*.js", "scripts/**/*.ts", "scripts/**/*.map"],
};
gulp.task("clean", function () {
return del(["wwwroot/scripts/**/*"]);
});
gulp.task("default", function (done) {
gulp.src(paths.scripts).pipe(gulp.dest("wwwroot/scripts"));
done();
});

3674
Selector.Web/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -4,8 +4,7 @@
"description": "",
"main": "index.ts",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "webpack --config webpack.config.js"
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
@ -18,9 +17,7 @@
},
"homepage": "https://github.com/Sarsoo/Selector#readme",
"devDependencies": {
"ts-loader": "^9.2.6",
"typescript": "^4.4.4",
"webpack": "^5.58.2",
"webpack-cli": "^4.9.1"
"del": "^6.0.0",
"gulp": "^4.0.2"
}
}

View File

@ -0,0 +1,6 @@
namespace Selector.Web {awdawd
class Watcher {ada
static example: string = "string";
}awdw
}

View File

@ -0,0 +1,14 @@
{
"compilerOptions": {
"sourceMap": true,
"noImplicitAny": true,
"noEmitOnError": true,
"module": "es6",
"target": "es5",
"allowJs": true
},
"exclude": [
"node_modules",
"wwwroot"
]
}