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

OSOE-84: Update documentation, minor adjustments for compatibility with NE #68

Merged
merged 24 commits into from
Jan 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
dd99242
Update pnpm lock file to v7
Nov 15, 2022
378e0ed
Remove obsolete .placeholder file
Nov 18, 2022
2d5b54e
Fix documentation
Nov 19, 2022
2b09409
Update documentation
Nov 19, 2022
c77f2fa
Merge remote-tracking branch 'origin/dev' into task/node-extensions
Nov 25, 2022
8d84dfa
Revert "Revert "Merge pull request #59 from Lombiq/issue/OSOE-92""
Nov 25, 2022
3afa020
Merge branch 'task/nodejs-extensions' into issue/OSOE-84-final
Nov 25, 2022
5b0f506
Merge branch 'task/nodejs-extensions' into issue/OSOE-84-final
Nov 25, 2022
0b1237d
Take into account NE location for VueJs location
Nov 29, 2022
c14c05e
Use targets from the "public API" instead of "private" ones
Nov 29, 2022
89bf3a2
Order dependencies
Nov 30, 2022
69ba36d
Adjust path to nodejs-extensions installation
Dec 2, 2022
c47bc5d
Merge branch 'task/nodejs-extensions' into issue/OSOE-84-final
Dec 7, 2022
9b41743
Merge remote-tracking branch 'origin/dev' into issue/OSOE-84-final
Dec 12, 2022
2ffb81f
Merge branch 'task/nodejs-extensions' into issue/OSOE-84-final
Dec 28, 2022
c2c2dc2
Update NE to latest NuGet package
Dec 28, 2022
8ee48c2
Update NE to latest NuGet package
Dec 29, 2022
4bab8d1
Update HL to latest NuGet package
Dec 29, 2022
d0df286
Update NE to latest NuGet package
Dec 29, 2022
d75e354
Avoid unnecessary params array creation
Jan 11, 2023
44bc9e4
Merge remote-tracking branch 'origin/dev' into issue/OSOE-84-final
Jan 16, 2023
907a0eb
Update Lombiq NuGet packages
Jan 16, 2023
162a553
Merge branch 'task/nodejs-extensions' into issue/OSOE-84-final
Jan 18, 2023
e26f529
Fix spelling, consolidate .npmrc
Jan 18, 2023
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
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