Skip to content

Commit f500dc6

Browse files
committed
- Updated legacy JavaScript projects to new format.
1 parent eda80dd commit f500dc6

13 files changed

Lines changed: 33 additions & 1881 deletions

‎Rock.CodeGeneration/Pages/ObsidianDetailBlockPage.xaml.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ private void ProcessPostSaveFiles( IReadOnlyList<GeneratedFile> files, Generated
288288
var file = createdFiles[i];
289289
var filename = Path.Combine( solutionPath, file.SolutionRelativePath );
290290

291-
if ( filename.EndsWith( ".cs" ) || filename.EndsWith( ".ts" ) || filename.EndsWith( ".obs" ) )
291+
if ( filename.EndsWith( ".cs" ) )
292292
{
293293
var projectName = file.SolutionRelativePath.Split( '\\' )[0];
294294

‎Rock.CodeGeneration/Pages/ObsidianEnumsPage.xaml.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ private void ProcessPostSaveFiles( IReadOnlyList<GeneratedFile> files, Generated
178178
var file = createdFiles[i];
179179
var filename = Path.Combine( solutionPath, file.SolutionRelativePath );
180180

181-
if ( filename.EndsWith( ".cs" ) || filename.EndsWith( ".ts" ) )
181+
if ( filename.EndsWith( ".cs" ) )
182182
{
183183
var projectName = file.SolutionRelativePath.Split( '\\' )[0];
184184

‎Rock.CodeGeneration/Pages/ObsidianListBlockPage.xaml.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ private void ProcessPostSaveFiles( IReadOnlyList<GeneratedFile> files, Generated
347347
var file = createdFiles[i];
348348
var filename = Path.Combine( solutionPath, file.SolutionRelativePath );
349349

350-
if ( filename.EndsWith( ".cs" ) || filename.EndsWith( ".ts" ) || filename.EndsWith( ".obs" ) )
350+
if ( filename.EndsWith( ".cs" ) )
351351
{
352352
var projectName = file.SolutionRelativePath.Split( '\\' )[0];
353353

‎Rock.CodeGeneration/Pages/ObsidianViewModelsPage.xaml.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ private void ProcessPostSaveFiles( IReadOnlyList<GeneratedFile> files, Generated
210210
var file = createdFiles[i];
211211
var filename = Path.Combine( solutionPath, file.SolutionRelativePath );
212212

213-
if ( filename.EndsWith( ".cs" ) || filename.EndsWith( ".ts" ) )
213+
if ( filename.EndsWith( ".cs" ) )
214214
{
215215
var projectName = file.SolutionRelativePath.Split( '\\' )[0];
216216

‎Rock.CodeGeneration/Utility/SolutionHelper.cs‎

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -341,23 +341,7 @@ public void AddCompileFileToProject( string projectName, string absoluteFilePath
341341
// If the file doesn't already exist in the project file then add it.
342342
if ( !project.Items.Any( pi => pi.EvaluatedInclude == relativeFilePath ) )
343343
{
344-
if ( relativeFilePath.EndsWith( ".ts" ) )
345-
{
346-
// Special handling for TypeScript files since the
347-
// project format is slightly different.
348-
var folderRelativePath = Path.GetDirectoryName( relativeFilePath ) + "\\";
349-
350-
if ( !project.Items.Any( pi => pi.EvaluatedInclude == folderRelativePath && pi.ItemType == "Folder" ) )
351-
{
352-
project.AddItem( "Folder", folderRelativePath );
353-
}
354-
355-
project.AddItem( "TypeScriptCompile", relativeFilePath );
356-
}
357-
else
358-
{
359-
project.AddItem( "Compile", relativeFilePath );
360-
}
344+
project.AddItem( "Compile", relativeFilePath );
361345

362346
// Mark the project as dirty if it isn't already.
363347
if ( !_dirtyOfflineProjects.Contains( project ) )
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<Project Sdk="Microsoft.VisualStudio.JavaScript.Sdk/1.0.586930">
2+
<PropertyGroup>
3+
<BuildCommand>npm run build</BuildCommand>
4+
<CleanCommand>npm run clean</CleanCommand>
5+
</PropertyGroup>
6+
</Project>

‎Rock.JavaScript.EditorJs/Rock.JavaScript.EditorJs.njsproj‎

Lines changed: 0 additions & 156 deletions
This file was deleted.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<Project Sdk="Microsoft.VisualStudio.JavaScript.Sdk/1.0.586930">
2+
<PropertyGroup>
3+
<BuildCommand>npm run build-fast</BuildCommand>
4+
<CleanCommand>npm run clean</CleanCommand>
5+
</PropertyGroup>
6+
</Project>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<Project Sdk="Microsoft.VisualStudio.JavaScript.Sdk/1.0.586930">
2+
<PropertyGroup>
3+
<BuildCommand>npm run build-fast</BuildCommand>
4+
<CleanCommand>npm run clean</CleanCommand>
5+
</PropertyGroup>
6+
</Project>

0 commit comments

Comments
 (0)