Skip to content

Commit

Permalink
Merge pull request #68 from Lombiq/issue/OSOE-84-final
Browse files Browse the repository at this point in the history
OSOE-84: Update documentation, minor adjustments for compatibility with NE
  • Loading branch information
sarahelsaig authored Jan 24, 2023
2 parents 792faad + e26f529 commit 532a4fb
Show file tree
Hide file tree
Showing 13 changed files with 39 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ static ResourceManagementOptionsConfiguration()
public void Configure(ResourceManagementOptions options) => options.ResourceManifests.Add(_manifest);
}

// NEXT STATION: Gulpfile.js
// NEXT STATION: package.json
8 changes: 2 additions & 6 deletions Lombiq.VueJs.Samples/Views/VueSfc/EnhancedList.cshtml
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
@model Lombiq.VueJs.Samples.ViewModels.EnhancedListViewModel
@model Lombiq.VueJs.Samples.ViewModels.EnhancedListViewModel

@{
var dependencies = string.Join(", ", new string[]
{
ResourceNames.EnhancementControl,
ResourceNames.EnhancementTableBody,
});
var dependencies = string.Join(", ", ResourceNames.EnhancementControl, ResourceNames.EnhancementTableBody);
}

<form id="enhanced-list">
Expand Down
7 changes: 3 additions & 4 deletions Lombiq.VueJs/.npmrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
; See https://pnpm.io/cli/run#shell-emulator for details.
shell-emulator = true

; Print as few commands to the console as possible.
loglevel = warn

; Fixing "missing package" error for airbnb eslint config.
auto-install-peers = true

; Skip adding NODE_PATH to binstubs (in /.bin) which can become extremely long for long directory names.
; Removed in pnpm@7, because it's the built-in behavior there.
extend-node-path = false
6 changes: 3 additions & 3 deletions Lombiq.VueJs/Assets/Scripts/helpers/process-helpers.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { handleErrorObject, handleErrorMessage } = require('nodejs-extensions/scripts/handle-error');
const { handleErrorObject, handleErrorMessage } = require('.nx/scripts/handle-error');
const path = require('path');

async function executeFunctionByCommandLineArgument(functions) {
Expand All @@ -21,8 +21,8 @@ async function executeFunctionByCommandLineArgument(functions) {

if (!target) helpAndExit(`Couldn't find the function "${functionName}".`);

// Execute the function with the provided options object, if any. If it's a thenable object (e.g. Promise), then
// it's also awaited.
// #spell-check-ignore-line: Execute the function with the provided options object, if any. If it's a thenable
// object (e.g. Promise), then it's also awaited.
const task = target[1](argumentOptions);
if (task && task.then) await task;
}
Expand Down
2 changes: 1 addition & 1 deletion Lombiq.VueJs/Assets/Scripts/helpers/rollup-pipeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const path = require('path');
const { minify } = require('terser');
const { rollup } = require('rollup');

const { handleErrorObject, handlePromiseRejectionAsError } = require('nodejs-extensions/scripts/handle-error');
const { handleErrorObject, handlePromiseRejectionAsError } = require('.nx/scripts/handle-error');

function createDirectory(directoryPath) {
return fs.existsSync(directoryPath) ? Promise.resolve() : fs.promises.mkdir(directoryPath, { recursive: true });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const sourceMap = require('source-map');
const readFile = require('fs').promises.readFile;
const { ESLint } = require('eslint');

const { formatter } = require('nodejs-extensions/scripts/eslint-msbuild-formatter');
const { formatter } = require('.nx/scripts/eslint-msbuild-formatter');

function onlyScript(source) {
for (let i = 0; i < source.length; i++) {
Expand Down
2 changes: 1 addition & 1 deletion Lombiq.VueJs/Lombiq.VueJs.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@

<ItemGroup Condition="'$(NuGetBuild)' == 'true'">
<PackageReference Include="Lombiq.HelpfulLibraries.OrchardCore" Version="5.1.0" />
<PackageReference Include="Lombiq.NodeJs.Extensions" Version="1.0.0-alpha.osoe-84.4" />
<PackageReference Include="Lombiq.NodeJs.Extensions" Version="1.0.0-alpha5.osoe-84" />
</ItemGroup>

<Import Condition="'$(NuGetBuild)' != 'true'" Project="..\..\..\Utilities\Lombiq.NodeJs.Extensions\Lombiq.NodeJs.Extensions\Lombiq.NodeJs.Extensions.targets" />
Expand Down
3 changes: 2 additions & 1 deletion Lombiq.VueJs/Lombiq.VueJs.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<PropertyGroup>
<LombiqVueJsNpmPackageSourcePath>./node_modules/.lv</LombiqVueJsNpmPackageSourcePath>
<LombiqVueJsNpmPackageSourcePath Condition="'$(NodeJsExtensionsNpmPackageSourcePath)' == ''">./node_modules/.lv</LombiqVueJsNpmPackageSourcePath>
<LombiqVueJsNpmPackageSourcePath Condition="'$(NodeJsExtensionsNpmPackageSourcePath)' != ''">$(NodeJsExtensionsNpmPackageSourcePath)/../.lv</LombiqVueJsNpmPackageSourcePath>
<LombiqVueJsInstallationPath>$(MSBuildThisFileDirectory.TrimEnd('/\'))</LombiqVueJsInstallationPath>
</PropertyGroup>

Expand Down
4 changes: 2 additions & 2 deletions Lombiq.VueJs/Lombiq.VueJs.targets
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<Target Name="InstallLombiqVueJsPackage"
AfterTargets="AddNodeJsExtensionsAsNpmPackage">
AfterTargets="InstallNodeJsExtensionsNpmPackage">
<Message
Text="Copying Lombiq.VueJs files to $(LombiqVueJsNpmPackageSourcePath):%0a - @(LombiqVueJsNpmPackageFiles,'%0a - ')"
Importance="$(_Importance)" />
Expand All @@ -15,7 +15,7 @@
<Exec Command="pnpm link $(LombiqVueJsNpmPackageSourcePath)" />
</Target>

<Target Name="DeleteLombiqVueJsNpmPackage" AfterTargets="DeleteNodeJsExtensionsNpmPackage">
<Target Name="DeleteLombiqVueJsNpmPackage" AfterTargets="CleanNodeJsExtensionsNpmPackage">
<ItemGroup>
<LombiqVueJsNpmPackageFoldersToDelete Condition="!Exists($(LombiqVueJsNpmPackageSourcePath))" />
<LombiqVueJsNpmPackageFoldersToDelete
Expand Down
16 changes: 8 additions & 8 deletions Lombiq.VueJs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@
"vuelidate": "0.7.4"
},
"devDependencies": {
"@rollup/plugin-alias": "^3.1.9",
"@rollup/plugin-commonjs": "^22.0.2",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^14.1.0",
"@rollup/plugin-replace": "^4.0.0",
"@vue/compiler-sfc": "^3.2.29",
"del": "^6.0.0",
"eslint": "^8.17.0",
"fancy-log": "^2.0.0",
"fs": "^0.0.1-security",
"glob": "^8.0.3",
"npm-run-all": "^4.1.5",
"rollup": "^2.79.1",
"@rollup/plugin-alias": "^3.1.9",
"@rollup/plugin-commonjs": "^22.0.2",
"rollup-plugin-eslint": "^7.0.0",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^14.1.0",
"@rollup/plugin-replace": "^4.0.0",
"terser": "^5.15.0",
"del": "^6.0.0",
"npm-run-all": "^4.1.5"
"terser": "^5.15.0"
},
"scripts": {
"build": "run-p --print-name --continue-on-error \"build:*\"",
Expand Down
10 changes: 7 additions & 3 deletions Lombiq.VueJs/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions Lombiq.VueJs/wwwroot/.placeholder

This file was deleted.

9 changes: 8 additions & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,14 @@ If your Vue app is just going to include one top level component and bind to tha
- Including a script element in your template will break it. Although you shouldn't do that anyway.
- As you might expect from Orchard Core, the style element isn't supported either since you will be using themes. If you can think of a use-case that's applicable for OC, please open an issue.

Regarding the points: if you need anything more complicated, first reconsider you application design to see if your goals can be achieved in a more Vue.js logic. For example pass the variables in your main app that hands them down via property binding. If you still need something else, either use a _cshtml_ templated app as outlined above or use shape overriding on the `VueComponent-{FileNameInPascalCase}` shape.
Regarding the points: If you need anything more complicated, first reconsider your application design to see if your goals can be achieved in a more Vue.js logic. For example, pass the variables in your main app that hands them down via property binding. If you still need something else, either use a _cshtml_ templated app as outlined above or use shape overriding on the `VueComponent-{FileNameInPascalCase}` shape.

## Dependencies

This module has the following dependencies:

- [Lombiq Helpful Libraries for Orchard Core](https://github.com/Lombiq/Helpful-Libraries)
- [Lombiq Node.js Extensions](https://gihub.com/Lombiq/NodeJs-Extensions)

## Contributing and support

Expand Down

0 comments on commit 532a4fb

Please sign in to comment.