How to download latest version of pnp webparts sppkg files? - sharepoint

I want to download latest build of sp-dev-fx-webparts. I need sppkg file, where I can find latest build of pnp webparts?
https://github.com/pnp/sp-dev-fx-webparts/tree/main/samples/react-list-form

.sppkg files for SPFx samples are not provided directly for some obvious reasons. Check the replies from repository moderator on this thread.
So, you have to clone the GitHub repository, build the web part & create a solution using below commands for which you the package file:
npm install
gulp build
gulp bundle --ship
gulp package-solution --ship
Related article: Walkthrough: how to deploy spfx sample webparts

Related

CKEditor5 Online Editor - How to configure a custom npm package for strapi

i use strapi and i want to change the default text editor with the ckeditor5 classic.
On the strapi website is a guide how to configure the default ckeditor5 classic for strapi.
Strapi Guide
But there are some important tools missing so I want to build my custom fork of the ckeditor5 classic package.
I started with the ckeditor5 online builder. Downloaded the build package and want to import it in the strapi project.
Online Builder
My problems starting here.
First of all, how I can use a downloaded package in a project instead of download it over npm/yarn?
Package Structure:
build
sample
src
Licsence
package.json
webpack.config
I saw that package has no main command in the package.json. So an import in a node.js file to this package doesn't work. Here is my question, is this package i build with the online generator intended for usage in a node project?
Look at the truth, I don't know very well, I'm not an expert on the subject yet ... I'm really new and I'm working with strapi, but as I see these plugins have an install command with NPM. Example:
enter image description here
Try to download the plugins by NPM or Yarn and then import them as they say in this post: Customizing CKEditor for Strapi gives "ckeditor-duplicated-modules" error

Cannot pack fork of azure-activedirectory-library-for-dotnet into nuget package

I made a fork of the library azure-activedirectory-library-for-dotnet and tried to pack it into a nuget package but failed.
I run the following command on the Developer Command Prompt to try to pack my fork into a nuget package.
nuget Pack src\Microsoft.IdentityModel.Clients.ActiveDirectory\Microsoft.IdentityModel.Clients.ActiveDirectory.csproj
And this is the error I get when I run this command:
Unable to find 'bin\Debug\Microsoft.IdentityModel.Clients.ActiveDirectory\bin\Debug\'. Make sure the project has been built.
But the project is build succesfull and contains the following folder in the debug folder:
My fork github page
The page where the original azure project is stored: Github azure
Link to issue I created on the github page: Issue

Deploy angular2 application

I developed an application in angular2 and now I need to deploy it.
Currently I have a wwww root folder containing:
html files
js files (generated from typescript)
css files (generated from scss)
/node_modules/ folders
/bower_componenets/ folder
The last two folders (node_modules & bower_components) are very heavy (300 mb and thousands of files) and it is very frustrating copy them using FTP.
Is there a way to keep only the needed files?
Thanks a lot
You can use gulp for creating bundle from the libraries into single file ex. vendor.js. Also deploying via ftp is very primitive. You should put your app on GitHub or Bitbucket and then log in to the server and pull your repository there and because you don't put the libraries folders into your git repository you will install the libraries on the server. If you want to go more advance you can use tool like Jenkins combined with gulp task for building your application. Jenkins will build your application automatically and deploy to your server on every push on your git repository
The following question could help you if you want to use Gulp:
How do I actually deploy an Angular 2 + Typescript + systemjs app?
Note that some answers are for beta versions and packaging changed for RC versions.
Angular-cli could also help you to build your application within the following command:
ng build -prod
Moreover using tree shaking could be interesting to minimize the weight of JavaScript files. See this article for more details:
http://blog.mgechev.com/2016/06/26/tree-shaking-angular2-production-build-rollup-javascript/

Using WebDeploy with an Azure node website doesn't trigger npm install

I am using WebDeploy to deploy a node website to azure.
I've seen in samples and demos that it should trigger a npm install on deploy.
But it is not. I've also seen almost every demo uses git deployment.
Is automatic npm install not supported for WebDeploy or am I missing something?
when you use WebDeploy, it will just copy over all the file from your machine to cloud, it will not trigger any build process. You will have to responsible to make sure your app is ready to run.
if you want CI function, please setup continues deployment, here is tutorial for setting up local git
https://azure.microsoft.com/en-us/documentation/articles/web-sites-publish-source-control/
and there are other options if you have repository in github/bitbucket/Visual studio Team Service etc ... (go to https://portal.azure.com, select your site --> all settings --> continuous deployment to see all supported optinos)
According to the doc Publish to Microsoft Azure Website using Web Deploy, it said
Deployment will include all the files in your project. Files in the node_modules folder are included automatically, even if they are not part of the project.
So all files under your project folder in VS, including the node_modules folder, will be deployed.

Deploy website to azure with bower dependencies

I have an ASPNET mvc project using both Nuget and Bower for dependencies. Now I need to either trigger bower to install components upon deployment or as fallback include the packages by allowing them in my .gitignore. Of course I would like to not include those in the repo and just have them installed while deploying, just like with nuget packages. I tried to follow this guide http://gregtrowbridge.com/deploying-a-bower-dependent-node-app-on-windows-azure/ but still nothing seems to happen. So any help is welcome :)
Best regards
All of Azure Websites workers have bower pre-installed and should be on your path.
All you need to do is add a custom deployment script that would do bower install
Here is a sample repo for an ASP.NET MVC site that uses bower
Basically make sure bower.json is there and referenced in your csproj
<Content Include="bower.json" />
Then download your custom deployment script. if you go to https://<yourSiteName>.scm.azurewebsites.net then click on Tools -> Download custom deployment script or just download it from D:\home\deployment\tools then check it in the root of your repo like here basically there will be 2 files deploy.cmd and .deployment
this is the deployment logic, add a step to restore bower in it like here after the last step there
:: 4. Bower Install
if EXIST "%DEPLOYMENT_TARGET%\bower.json" (
pushd "%DEPLOYMENT_TARGET%"
call :ExecuteCmd bower install
IF !ERRORLEVEL! NEQ 0 goto error
popd
)
You can use the console feature of Azure web app to fire the commands. Even if the console has access to a restricted features, you can still install the bower components by using the command:
bower install
The console option is listed under the deployment section of the Web Apps. You can refer the below the screen for reference.
Prerequisites:
Do not publish the bowerComponents folder to the Web app.
Include the bower.json file including all the dependencies.
Hope it helps.
One important addition to the above - you must push both the unchanged .deployment file and modified .cmd file to deployment root for Azure to subsequently copy/execute your .cmd amendments. Otherwise it will regenerate a default .cmd

Resources