Skip to content

Commit

Permalink
adjust folder and namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
yoli799480165 committed Dec 29, 2023
1 parent 9537310 commit 3163705
Show file tree
Hide file tree
Showing 19 changed files with 17 additions and 26 deletions.
14 changes: 7 additions & 7 deletions generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -328,32 +328,32 @@ ${sb} }

function generateProperty() {
const input = './node_modules/csstype/index.d.ts';
const output = './src/Types/Property.cs';
const output = './src/Css/Property.cs';
generatePropertyTypes(input, output, 18459, 20144);
generatePropertyGeneric('./src/Types/PropertyT.cs', 4);
generatePropertyGeneric('./src/Css/PropertyT.cs', 4);
}

function generateStandardLonghand() {
const input = './node_modules/csstype/index.d.ts';
const output = './src/CSSObject.StandardLonghand.cs';
const output = './src/Css/CSSObject.StandardLonghand.cs';
generatePropertyItems(input, output, 11, 5064);
}

function generateStandardShorthand() {
const input = './node_modules/csstype/index.d.ts';
const output = './src/CSSObject.StandardShorthand.cs';
const output = './src/Css/CSSObject.StandardShorthand.cs';
generatePropertyItems(input, output, 5066, 5864);
}

function generateVendorLonghand() {
const input = './node_modules/csstype/index.d.ts';
const output = './src/CSSObject.VendorLonghand.cs';
const output = './src/Css/CSSObject.VendorLonghand.cs';
generatePropertyItems(input, output, 5870, 7663);
}

function generateVendorShorthand() {
const input = './node_modules/csstype/index.d.ts';
const output = './src/CSSObject.VendorShorthand.cs';
const output = './src/Css/CSSObject.VendorShorthand.cs';
generatePropertyItems(input, output, 7665, 7816);
}

Expand Down Expand Up @@ -381,7 +381,7 @@ ${items.join(',\r\n')}
};
}
}`;
const output = './src/Types/Unitless.cs';
const output = './src/Css/Unitless.cs';
fs.writeFileSync(output, template, 'utf8');
}

Expand Down
1 change: 0 additions & 1 deletion src/Compiler/Parser.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using static CssInCSharp.Compiler.Utility;
using static CssInCSharp.Compiler.Enum;
using System.Collections.Generic;
using CssInCSharp;

namespace CssInCSharp.Compiler
{
Expand Down
10 changes: 10 additions & 0 deletions src/Compiler/Utility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,15 @@ public static int Abs(int value)
{
return Math.Abs(value);
}

public static void SetValue<T>(this List<T> list, int index, T value)
{
if (index + 1 > list.Count)
{
var diff = index + 1 - list.Count;
list.AddRange(new T[diff]);
}
list[index] = value;
}
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion src/CSSObject.cs → src/Css/CSSObject.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using System;
using static CssInCSharp.Compiler.Serializer;
using static CssInCSharp.Compiler.Parser;
using static CssInCSharp.Constant;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
17 changes: 0 additions & 17 deletions src/Extensions/CollectionExtension.cs

This file was deleted.

0 comments on commit 3163705

Please sign in to comment.