Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: adjust folder and namespace #18

Merged
merged 1 commit into from
Dec 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
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.

Loading