SmartCode.CLI
1.3.8
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet tool install --global SmartCode.CLI --version 1.3.8
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo dotnet tool install --local SmartCode.CLI --version 1.3.8
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=SmartCode.CLI&version=1.3.8
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package SmartCode.CLI --version 1.3.8
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
SmartCode
SmartCode = IDataSource → IBuildTask → IOutput ⇒ Build Everything
Introduction
SmartCode.Db (Code generator)
Demo
Getting Started
- Install from .NET Core Global Tool
dotnet tool install --global SmartCode.CLI
- edit build configuration file (default: SmartCode.yml)
- the command line executes the SmartCode command.
- SmartCode
- wait for prompt to enter the configuration file path (optional: SmartCode.yml file in the default program root directory)
- carriage return execution command
- wait for the end of the task execution.
- View output directory results
Building configuration files
Module: SmartSql.Starter
Author: Ahoo Wang
DataSource:
Name: Db
Paramters:
DbName: SmartSqlStarterDB
DbProvider: SqlServer
ConnectionString: Data Source=.;Initial Catalog=SmartSqlStarterDB;Integrated Security=True
Language: CSharp
TemplateEngine: Razor
Output:
Type: File
Path: 'E://SmartSql-Starter'
Build:
ClearDir:
Type: Clear
Paramters:
Dirs: '.'
Solution:
Type: Project
Template: Sln.cshtml
Output:
Path: '.'
Name: '{{Project.Module}}'
Extension: '.sln'
SmartSqlConfig:
Type: Project
Template: SqlMapConfig.cshtml
Output:
Path: '{{Project.Module}}.API'
Name: 'SmartSqlMapConfig'
Extension: '.xml'
Entity_Project:
Type: Project
Template: Proj.cshtml
Output:
Path: '{{Project.Module}}.Entity'
Name: '{{Project.Module}}.Entity'
Extension: '.csproj'
Entity:
Type: Table
Module: Entity
Template: Entity.cshtml
Output:
Path: '{{Project.Module}}.{{Build.Module}}'
Extension: '.cs'
NamingConverter:
Table:
Tokenizer:
Type: Default
Paramters:
IgnorePrefix: 'T_'
Delimiter: '_'
Converter:
Type: Default
Paramters: { }
View:
Tokenizer:
Type: Default
Paramters:
IgnorePrefix: 'V_'
Delimiter: '_'
Converter:
Type: Pascal
Column:
Tokenizer:
Type: Default
Paramters:
Delimiter: '_'
Converter:
Type: Pascal
Repository_Project:
Type: Project
Template: Proj-Repository.cshtml
Output:
Path: '{{Project.Module}}.Repository'
Name: '{{Project.Module}}.Repository'
Extension: '.csproj'
Repository:
Type: Table
Module: Repository
Template: Repository.cshtml
Output:
Path: '{{Project.Module}}.{{Build.Module}}'
Name: 'I{{OutputName}}Repository'
Extension: .cs
NamingConverter:
Table:
Tokenizer:
Type: Default
Paramters:
IgnorePrefix: 'T_'
Delimiter: '_'
Converter:
Type: Default
View:
Tokenizer:
Type: Default
Paramters:
IgnorePrefix: 'V_'
Delimiter: '_'
Converter:
Type: Default
SqlMap:
Type: Table
Template: SqlMap-SqlServer.cshtml
Output:
Path: '{{Project.Module}}.API/Maps'
Extension: .xml
IgnoreTables: null
NamingConverter:
Table:
Tokenizer:
Type: Default
Paramters:
IgnorePrefix: 'T_'
Delimiter: '_'
Converter:
Type: Default
View:
Tokenizer:
Type: Default
Paramters:
IgnorePrefix: 'V_'
Delimiter: '_'
Converter:
Type: Default
Column:
Tokenizer:
Type: Default
Paramters:
IgnorePrefix: 'T_'
Delimiter: '_'
Converter:
Type: Default
Parameter Name | Description |
---|---|
Module | Root Module Name |
Author | Author |
DataSource | Data Source |
Language | Language: CSharp/Java/.... |
TemplateEngine | Template Engine: Currently Built: Razor/Handlebars |
Output | Output |
Build | Task Build |
DataSource Data Source, Name: Db
Property Name: Db, using the DbSource plugin as a data source
DbSource.Paramters accepts the following three parameters:
Parameter Name | Description |
---|---|
DbName | Database Name |
DbProvider | Data Drivers: MySql, MariaDB, PostgreSql, SqlServer, Oracle, SQLite |
ConnectionString | Connection String |
Build Task Build
Parameter Name | Description |
---|---|
Type | Build type, Clear: used to clean up the directory s / file s, Project: used to build a single file, such as: solution file / project file, Table: used to build a data table-based file, such as: Entity , Repository file |
Module | Building Module Name |
TemplateEngine | Template Engine, optional, default to root module engine |
Template | Template File |
Output | Output |
IncludeTables | Include table name s |
IgnoreTables | Ignore table name s |
NamingConverter | Named Converter |
Paramters | Custom Build Parameters |
NamingConverter Name Conversion
Attribute | Description |
---|---|
Type | Table/View/Column |
Tokenizer | Word Segmenter |
Converter | Converter: Camel/Pascal/None |
NamingConverter.Tokenizer Word Segmenter
Attribute | Description |
---|---|
Type | Default |
Paramters.IgnorePrefix | Ignore prefix characters |
Paramters.Delimiter | Separator |
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.1 is compatible. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
Version | Downloads | Last updated |
---|---|---|
3.0.1 | 2,388 | 6/16/2022 |
3.0.0 | 1,885 | 3/3/2022 |
2.4.0-preview.1 | 134 | 6/15/2022 |
2.4.0-preview.0 | 156 | 5/7/2022 |
2.3.7 | 1,861 | 3/3/2022 |
2.3.6 | 2,589 | 6/10/2020 |
2.3.5 | 1,983 | 4/29/2020 |
2.3.4 | 1,923 | 3/27/2020 |
2.3.3 | 1,642 | 3/27/2020 |
2.3.2 | 1,856 | 3/11/2020 |
2.3.1 | 2,039 | 3/11/2020 |
2.3.0 | 1,872 | 3/11/2020 |
2.2.95 | 1,818 | 2/17/2020 |
2.2.94 | 1,800 | 2/14/2020 |
2.2.93 | 1,926 | 2/14/2020 |
2.2.92 | 1,803 | 11/18/2019 |
2.2.90 | 1,975 | 11/12/2019 |
2.2.88 | 1,982 | 10/30/2019 |
2.2.86 | 1,806 | 10/23/2019 |
2.2.85 | 1,943 | 10/22/2019 |
2.2.84 | 1,734 | 10/22/2019 |
2.2.83 | 2,026 | 10/22/2019 |
2.2.82 | 1,836 | 10/21/2019 |
2.2.81 | 1,758 | 10/21/2019 |
2.2.80 | 1,612 | 10/21/2019 |
2.2.70 | 1,938 | 8/21/2019 |
2.2.68 | 1,935 | 8/5/2019 |
2.2.66 | 1,807 | 7/29/2019 |
2.2.65 | 1,808 | 7/22/2019 |
2.2.62 | 1,708 | 7/19/2019 |
2.2.60 | 2,093 | 7/19/2019 |
2.2.58 | 1,966 | 7/10/2019 |
2.2.57 | 2,017 | 7/8/2019 |
2.2.56 | 1,807 | 6/28/2019 |
2.2.55 | 1,968 | 6/11/2019 |
2.2.53 | 1,971 | 6/10/2019 |
2.2.52 | 2,108 | 6/4/2019 |
2.2.50 | 1,946 | 6/3/2019 |
2.2.48 | 1,832 | 5/23/2019 |
2.2.46 | 1,742 | 5/23/2019 |
2.2.45 | 2,869 | 5/7/2019 |
2.2.44 | 1,980 | 5/6/2019 |
2.2.42 | 2,115 | 4/30/2019 |
2.2.40 | 1,994 | 4/30/2019 |
2.2.38 | 2,202 | 4/30/2019 |
2.2.36 | 1,661 | 4/29/2019 |
2.2.30 | 1,935 | 4/26/2019 |
2.2.25 | 2,050 | 4/26/2019 |
2.2.22 | 1,860 | 4/25/2019 |
2.2.20 | 1,899 | 4/24/2019 |
2.2.10 | 1,936 | 4/23/2019 |
2.2.8 | 1,929 | 4/23/2019 |
2.2.2 | 1,978 | 4/18/2019 |
2.2.0 | 1,675 | 4/16/2019 |
2.1.10 | 1,625 | 4/16/2019 |
2.1.9 | 2,015 | 4/11/2019 |
2.1.8 | 1,790 | 4/10/2019 |
2.1.6 | 1,678 | 4/10/2019 |
2.1.5 | 2,154 | 4/1/2019 |
2.1.3 | 1,856 | 3/29/2019 |
2.1.2 | 1,696 | 3/25/2019 |
2.1.1 | 1,973 | 3/22/2019 |
2.1.0 | 1,839 | 3/22/2019 |
2.0.5 | 2,052 | 2/27/2019 |
2.0.4 | 2,328 | 12/17/2018 |
2.0.2 | 2,073 | 12/14/2018 |
2.0.0 | 102,709 | 12/14/2018 |
1.18.2 | 115,058 | 11/22/2018 |
1.18.1 | 15,419 | 11/16/2018 |
1.16.20 | 12,660 | 11/16/2018 |
1.16.19 | 12,215 | 11/16/2018 |
1.16.18 | 6,702 | 11/14/2018 |
1.16.16 | 3,529 | 11/7/2018 |
1.16.15 | 2,091 | 11/4/2018 |
1.16.13 | 8,941 | 11/4/2018 |
1.16.12 | 4,149 | 11/1/2018 |
1.16.6 | 10,336 | 10/31/2018 |
1.16.2 | 10,921 | 10/31/2018 |
1.16.1 | 46,580 | 10/31/2018 |
1.16.0 | 2,200 | 10/30/2018 |
1.12.0 | 2,017 | 10/30/2018 |
1.9.0 | 2,209 | 10/27/2018 |
1.8.1 | 2,663 | 10/26/2018 |
1.8.0 | 2,864 | 10/25/2018 |
1.7.6 | 3,168 | 10/24/2018 |
1.7.5 | 3,010 | 10/24/2018 |
1.7.2 | 3,386 | 10/22/2018 |
1.7.1 | 2,765 | 10/21/2018 |
1.6.9 | 2,330 | 10/20/2018 |
1.6.8.1 | 2,739 | 10/20/2018 |
1.6.8 | 3,048 | 10/20/2018 |
1.6.2 | 2,206 | 10/19/2018 |
1.5.0 | 2,260 | 10/18/2018 |
1.4.6 | 2,322 | 10/18/2018 |
1.3.9 | 2,263 | 10/17/2018 |
1.3.8 | 2,341 | 10/17/2018 |
1.3.6 | 2,102 | 10/15/2018 |
1.3.4 | 2,464 | 10/11/2018 |
1.3.0 | 2,158 | 10/9/2018 |
1.2.0 | 2,028 | 10/8/2018 |
1.1.0 | 2,461 | 10/7/2018 |
1.0.0 | 2,376 | 10/7/2018 |