Clarion fits in nicely with your ASP.Net projects. Managing Font, Style and Script files in your presentation layer can often become complex and cluttered very quickly. Clarion will help keep your project clean.
In the command line, navigate to to the project folder you would like to add Clarion to. (If you are using Visual Studio 2017, you right-click the project and select "Open in Command Line".)
Run the following command to install the basic architecture:
The first thing that needs to be done is to include the new files and folders in the project.
Now that the files have been added to the project, there are 2 things that need to be fixed:
The new directories that have been added to the project most likely do not match your project's naming convention. A popular way of organizing precompiled content such as SASS and TypeScript is to put them into an
src directory to
Assets. Also, just to keep it tidy, let's move the
build directory into that same directory. Now all of our front-end code is in the same place. (It is also common to store
image files in here as well.)
We need to update WebPack to look into this new directory to compile the code as well as change the output directory to the new location in the
Assets directory. If you are using Gulp or Grunt, the process will be similar.
webpack.config.jsat the root of the project
entryproperty to the new
outputobject so that the
filenameproperty also points to the new directory:
pluginssection change the css output path to
New files that are added using the CLI will not automatically be included in the project. In order to include them you will have to show hidden files, right-click, and select "Include In Project". This process will effectively eliminate any efficiencies gained by using the CLI. Instead, we can modify the
.csproj to automatically include them.
Assetsdirectory contents are being included
npm run build. You should see the compiled
jsfiles already included in the project (you may have to refresh the Solution Explorer)
Now that we have moved things around, we need to configure Clarion to tell Clarion where to add new files.
clarion config init
.clarionfile in your project
"./Assetsby running the following command
clarion config paths.styles ./Assetsor by manually changing the
styleproperty in the
pathsobject to "./Assets".
After saving the configuration changes in the
.clarion config file, you should be able to use the Clarion CLI normally.