Updated container, readme, sample.json
This commit is contained in:
parent
ba1023210b
commit
6fde882b5b
|
@ -1,47 +0,0 @@
|
||||||
FROM mcr.microsoft.com/powershell:7.1.0-ubuntu-focal
|
|
||||||
|
|
||||||
ENV NPM_CONFIG_PREFIX=/home/copy-views-container/.npm-global \
|
|
||||||
PATH=$PATH:/home/copy-views-container/.npm-global/bin
|
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y \
|
|
||||||
git \
|
|
||||||
curl \
|
|
||||||
sudo \
|
|
||||||
zsh \
|
|
||||||
jq \
|
|
||||||
vim \
|
|
||||||
&& curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash - \
|
|
||||||
&& apt-get install nodejs -y \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
RUN useradd \
|
|
||||||
--user-group \
|
|
||||||
--system \
|
|
||||||
--create-home \
|
|
||||||
--no-log-init \
|
|
||||||
copy-views-container
|
|
||||||
|
|
||||||
USER copy-views-container
|
|
||||||
|
|
||||||
EXPOSE 5432 4321 35729
|
|
||||||
|
|
||||||
WORKDIR /home/copy-views-container
|
|
||||||
|
|
||||||
# ********************************************************
|
|
||||||
# * Anything else you want to do like clean up goes here *
|
|
||||||
# ********************************************************
|
|
||||||
|
|
||||||
RUN npm install -g gulp-cli@latest yo@4 @microsoft/generator-sharepoint@1.16.1 spfx-fast-serve@3 @pnp/cli-microsoft365 --unsafe-perm
|
|
||||||
|
|
||||||
RUN zsh -c "$(curl https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" --unattended \
|
|
||||||
&& git clone https://github.com/denysdovhan/spaceship-prompt.git "$HOME/.oh-my-zsh/custom/themes/spaceship-prompt" --depth=1 \
|
|
||||||
&& ln -s "$HOME/.oh-my-zsh/custom/themes/spaceship-prompt/spaceship.zsh-theme" "$HOME/.oh-my-zsh/custom/themes/spaceship.zsh-theme" \
|
|
||||||
&& cp "$HOME/.oh-my-zsh/templates/zshrc.zsh-template" $HOME/.zshrc \
|
|
||||||
&& git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $HOME/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting \
|
|
||||||
&& git clone https://github.com/zsh-users/zsh-autosuggestions $HOME/.oh-my-zsh/custom/plugins/zsh-autosuggestions \
|
|
||||||
&& sed -i "11s/ZSH_THEME=\"robbyrussell\"/ZSH_THEME=\"spaceship\"/" ~/.zshrc \
|
|
||||||
&& sed -i "27s/# DISABLE_AUTO_UPDATE=\"true\"/DISABLE_AUTO_UPDATE=\"true\"/" ~/.zshrc \
|
|
||||||
&& sed -i "73s/plugins=(git)/plugins=(git zsh-autosuggestions zsh-syntax-highlighting)/" ~/.zshrc \
|
|
||||||
&& sed -i "50s/# COMPLETION_WAITING_DOTS/COMPLETION_WAITING_DOTS/" ~/.zshrc
|
|
||||||
|
|
||||||
CMD [ "/bin/zsh", "-l" ]
|
|
|
@ -1,42 +1,39 @@
|
||||||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
|
// For more information on how to run this SPFx project in a VS Code Remote Container, please visit https://aka.ms/spfx-devcontainer
|
||||||
// https://github.com/microsoft/vscode-dev-containers/tree/v0.194.0/containers/typescript-node
|
|
||||||
{
|
{
|
||||||
"name": "copy-views-container",
|
"name": "SPFx 1.16.1",
|
||||||
"build": {
|
"image": "docker.io/m365pnp/spfx:1.16.1",
|
||||||
"dockerfile": "Dockerfile",
|
|
||||||
// Update 'VARIANT' to pick a Node version: 12, 14, 16
|
|
||||||
"args": {
|
|
||||||
"VARIANT": "14"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// Set *default* container specific settings.json values on container create.
|
// Set *default* container specific settings.json values on container create.
|
||||||
"settings": {
|
"settings": {},
|
||||||
"terminal.integrated.profiles.linux": {
|
|
||||||
"zsh": {
|
|
||||||
"path": "/bin/zsh",
|
|
||||||
"args": [
|
|
||||||
"-l"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"terminal.integrated.defaultProfile.linux": "zsh"
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
// Add the IDs of extensions you want installed when the container is created.
|
// Add the IDs of extensions you want installed when the container is created.
|
||||||
"extensions": [
|
"extensions": [
|
||||||
"dbaeumer.vscode-eslint",
|
"editorconfig.editorconfig",
|
||||||
"mhutchie.git-graph",
|
"dbaeumer.vscode-eslint"
|
||||||
"eamodio.gitlens"
|
|
||||||
],
|
],
|
||||||
|
|
||||||
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||||
"forwardPorts": [5432, 4321, 35729],
|
"forwardPorts": [
|
||||||
|
4321,
|
||||||
// Use 'postCreateCommand' to run commands after the container is created.
|
35729
|
||||||
//"postCreateCommand": "npm install",
|
],
|
||||||
|
"portsAttributes": {
|
||||||
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
|
"4321": {
|
||||||
"remoteUser": "copy-views-container"
|
"protocol": "https",
|
||||||
|
"label": "Manifest",
|
||||||
|
"onAutoForward": "silent",
|
||||||
|
"requireLocalPort": true
|
||||||
|
},
|
||||||
|
// Not needed for SPFx>= 1.12.1
|
||||||
|
// "5432": {
|
||||||
|
// "protocol": "https",
|
||||||
|
// "label": "Workbench",
|
||||||
|
// "onAutoForward": "silent"
|
||||||
|
// },
|
||||||
|
"35729": {
|
||||||
|
"protocol": "https",
|
||||||
|
"label": "LiveReload",
|
||||||
|
"onAutoForward": "silent",
|
||||||
|
"requireLocalPort": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"postCreateCommand": "bash .devcontainer/spfx-startup.sh",
|
||||||
|
"remoteUser": "node"
|
||||||
}
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
echo
|
||||||
|
echo -e "\e[1;94mInstalling Node dependencies\e[0m"
|
||||||
|
npm install
|
||||||
|
|
||||||
|
## commands to create dev certificate and copy it to the root folder of the project
|
||||||
|
echo
|
||||||
|
echo -e "\e[1;94mGenerating dev certificate\e[0m"
|
||||||
|
gulp trust-dev-cert
|
||||||
|
|
||||||
|
# Convert the generated PEM certificate to a CER certificate
|
||||||
|
openssl x509 -inform PEM -in ~/.rushstack/rushstack-serve.pem -outform DER -out ./spfx-dev-cert.cer
|
||||||
|
|
||||||
|
# Copy the PEM ecrtificate for non-Windows hosts
|
||||||
|
cp ~/.rushstack/rushstack-serve.pem ./spfx-dev-cert.pem
|
||||||
|
|
||||||
|
## add *.cer to .gitignore to prevent certificates from being saved in repo
|
||||||
|
if ! grep -Fxq '*.cer' ./.gitignore
|
||||||
|
then
|
||||||
|
echo "# .CER Certificates" >> .gitignore
|
||||||
|
echo "*.cer" >> .gitignore
|
||||||
|
fi
|
||||||
|
|
||||||
|
## add *.pem to .gitignore to prevent certificates from being saved in repo
|
||||||
|
if ! grep -Fxq '*.pem' ./.gitignore
|
||||||
|
then
|
||||||
|
echo "# .PEM Certificates" >> .gitignore
|
||||||
|
echo "*.pem" >> .gitignore
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo -e "\e[1;92mReady!\e[0m"
|
||||||
|
|
||||||
|
echo -e "\n\e[1;94m**********\nOptional: if you plan on using gulp serve, don't forget to add the container certificate to your local machine. Please visit https://aka.ms/spfx-devcontainer for more information\n**********"
|
|
@ -8,14 +8,20 @@ This solution enables a user to copy views from one list/library to another acro
|
||||||
|
|
||||||
![Copy Views](./assets/copy-views.gif)
|
![Copy Views](./assets/copy-views.gif)
|
||||||
|
|
||||||
## Used Versions
|
## Compatibility
|
||||||
|
|
||||||
![SPFx 1.15.2](https://img.shields.io/badge/SPFx-1.16.1-green.svg)
|
| :warning: Important |
|
||||||
![pnpjs](https://img.shields.io/badge/pnpjs-3.6-green.svg)
|
|:---------------------------|
|
||||||
![Node.js v16.13](https://img.shields.io/badge/Node.js-v16.13+-green.svg)
|
| Every SPFx version is only compatible with specific version(s) of Node.js. In order to be able to build this sample, please ensure that the version of Node on your workstation matches one of the versions listed in this section. This sample will not work on a different version of Node.|
|
||||||
|
|Refer to <https://aka.ms/spfx-matrix> for more information on SPFx compatibility. |
|
||||||
|
|
||||||
|
This sample is optimally compatible with the following environment configuration:
|
||||||
|
|
||||||
|
![SPFx 1.16.1](https://img.shields.io/badge/SPFx-1.16.1-green.svg)
|
||||||
|
![Node.js v16 | v14 | v12](https://img.shields.io/badge/Node.js-v16%20%7C%20v14%20%7C%20v12-green.svg)
|
||||||
![Compatible with SharePoint Online](https://img.shields.io/badge/SharePoint%20Online-Compatible-green.svg)
|
![Compatible with SharePoint Online](https://img.shields.io/badge/SharePoint%20Online-Compatible-green.svg)
|
||||||
![Does not work with SharePoint 2019](https://img.shields.io/badge/SharePoint%20Server%202019-Unknown-red.svg "SharePoint Server 2019 requires SPFx 1.4.1 or lower")
|
![Does not work with SharePoint 2019](https://img.shields.io/badge/SharePoint%20Server%202019-Incompatible-red.svg "SharePoint Server 2019 requires SPFx 1.4.1 or lower")
|
||||||
![Does not work with SharePoint 2016 (Feature Pack 2)](https://img.shields.io/badge/SharePoint%20Server%202016%20(Feature%20Pack%202)-Unknown-red.svg "SharePoint Server 2016 Feature Pack 2 requires SPFx 1.1")
|
![Does not work with SharePoint 2016 (Feature Pack 2)](https://img.shields.io/badge/SharePoint%20Server%202016%20(Feature%20Pack%202)-Incompatible-red.svg "SharePoint Server 2016 Feature Pack 2 requires SPFx 1.1")
|
||||||
![Local Workbench Unsupported](https://img.shields.io/badge/Local%20Workbench-Unsupported-red.svg "Local workbench is no longer available as of SPFx 1.13 and above")
|
![Local Workbench Unsupported](https://img.shields.io/badge/Local%20Workbench-Unsupported-red.svg "Local workbench is no longer available as of SPFx 1.13 and above")
|
||||||
![Hosted Workbench Compatible](https://img.shields.io/badge/Hosted%20Workbench-Compatible-green.svg)
|
![Hosted Workbench Compatible](https://img.shields.io/badge/Hosted%20Workbench-Compatible-green.svg)
|
||||||
![Compatible with Remote Containers](https://img.shields.io/badge/Remote%20Containers-Compatible-green.svg)
|
![Compatible with Remote Containers](https://img.shields.io/badge/Remote%20Containers-Compatible-green.svg)
|
||||||
|
@ -27,17 +33,14 @@ This solution enables a user to copy views from one list/library to another acro
|
||||||
|
|
||||||
> Get your own free development tenant by subscribing to [Microsoft 365 developer program](http://aka.ms/o365devprogram)
|
> Get your own free development tenant by subscribing to [Microsoft 365 developer program](http://aka.ms/o365devprogram)
|
||||||
|
|
||||||
## Solution
|
## Authors
|
||||||
|
[Martin Lingstuyl](https://github.com/martinlingstuyl) ([@martinlingstuyl](https://twitter.com/martinlingstuyl)), I4-YOU Business Solutions b.v.
|
||||||
| Solution | Author(s) |
|
|
||||||
| ----------- | ------------------------------------------------------- |
|
|
||||||
| Copy Views | [Martin Lingstuyl](https://github.com/martinlingstuyl) ([@martinlingstuyl](https://twitter.com/martinlingstuyl)), I4-YOU Business Solutions b.v. |
|
|
||||||
|
|
||||||
## Version history
|
## Version history
|
||||||
|
|
||||||
| Version | Date | Comments |
|
| Version | Date | Comments |
|
||||||
| ------- | ---------------- | --------------- |
|
| ------- | ---------------- | --------------- |
|
||||||
| 1.0.2.0 | August 29, 2022 | Upgraded to SPFx version 1.16.1 |
|
| 1.0.2.0 | Feb 9, 2023 | Upgraded to SPFx version 1.16.1 |
|
||||||
| 1.0.1.5 | August 29, 2022 | Initial release |
|
| 1.0.1.5 | August 29, 2022 | Initial release |
|
||||||
|
|
||||||
## Minimal Path to Awesome
|
## Minimal Path to Awesome
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
"The Copy Views solution enables a user to copy views from one list/library to another across site collections. It can be used as a webpart on a page, or as a ListView Command Set extension. The user can select multiple views to copy to multiple target lists."
|
"The Copy Views solution enables a user to copy views from one list/library to another across site collections. It can be used as a webpart on a page, or as a ListView Command Set extension. The user can select multiple views to copy to multiple target lists."
|
||||||
],
|
],
|
||||||
"creationDateTime": "2022-08-29",
|
"creationDateTime": "2022-08-29",
|
||||||
"updateDateTime": "2022-09-12",
|
"updateDateTime": "2023-02-09",
|
||||||
"products": [
|
"products": [
|
||||||
"SharePoint"
|
"SharePoint"
|
||||||
],
|
],
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"key": "SPFX-VERSION",
|
"key": "SPFX-VERSION",
|
||||||
"value": "1.15.2"
|
"value": "1.16.1"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"thumbnails": [
|
"thumbnails": [
|
||||||
|
|
Loading…
Reference in New Issue