
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
sharepoint-util
Advanced tools
Another project created using generator-sharepoint-app.
Please fill in this section as per the project you're working on.
The generator uses the following technologies:
autoprefixer to add browser-specific css properties. So, no need to add all variations of a css property, it'll be taken care of for you.To setup this project, clone the repo and then run npm install.
$ git clone __PROJECT_REPO_URL__
$ npm install
The project uses gulp for task automation and prototyping. The following gulp tasks are supported:
gulp sass:variablesExtract all variables from all the subfolders inside the sass folder and generates _extractedvariables.scss file at the root sass folder. The file will contain all the variables from all the subfolders with the values replaced with brand variables (from the _settings.scss file).
The task has no dependencies.
_extractedvariables.scss. On subsequent runs, the task will add new variables while keeping old variables as is). This essentially means that changes made to _extractedvariables.scss will be persisted and it is safe to update the variables in that file.--forceReplace command line argument, for example to completely replace variables do: $ gulp sass:variables --forceReplace
_settings.scss at the top of the generated file using the --withSettings parameter. To do that run: $ gulp sass:variables --withSettings
_settings.scss and to force replace the variables. To do that run: $ gulp sass:variables --withSettings --forceReplace
gulp sass:compileCompiles all files in the projects sass directory (based on sass compilation technique), i.e. if the file is prepended with an underscore _ it won't produce an output. In a default configuration, the task will generate main.min.css in the dist/css folder.
gulp sass:variablesIf the task is executed while in prototyping mode it will also compile prototypes sass files into the prototype folder. You can force prototyping mode using the --isPrototyping or --prototype command line argument.
$ gulp sass:compile --isPrototyping #or
$ gulp sass:compile --prototype
If the task is executing and the SharePoint drive for the SiteAssets library is mapped, it will also copy the output files into ${SiteAssetsDrive}:\\${deploymentDir}/css folder, defaults to Sysdoc/css . Note: you need to be working in debug mode. To force debug mode use --dev or use --env dev. To do that run:
$ gulp sass:compile --dev #or
$ gulp sass:compile --env dev
gulp sass:watchRuns a watch on the sass folder to listen for file changes. Once a change is detected, the gulp sass:compile file will be executed.
$ gulp sass:watch
gulp sass:compilegulp sass:compile and gulp sass:variables, it will be propagated to the other tasks.gulp lib:downloadDownloads CDN files configured through the generator. The downloaded files will be moved to lib in the repo.
yo generator-sharepoint-app to add cdn files.css and js files. The task will download both.gulp lib:compile:jsCompiles all the js files from the lib directory into dist/js/vendor.js.
gulp lib:compile:cssCompiles all the css files from the lib directory into dist/css/vendor.css.
gulp masterpages:compileCompiles all the master page templates into the provisioningDir (defaults to deploy).
masterPageCatalog drive is mapped, the task will also copy the compiled master pages to the mapped drive.debug mode using --dev or --env dev to force debug mode.gulp masterpages:watchSetup a watch on the master page templates directory such that when the templates change, the gulp masterpages:compile task is executed.
gulp pagelayouts:compileCompiles all page layouts into the provisioningDir (defaults to deploy).
gulp pagelayouts:watchSetup a watch on the page layouts templates directory. Once a page layout template changes it will run the gulp pagelayouts:compile task.
gulp pagelayouts:compilegulp js:compileCompiles TypeScript source files into dist/js directory. This includes all prototype source files as well.
By default the task compiles all files that are added to webpack.config.js and all the prototypes. This can become a bit slow if you have many prototypes. So, to exclude a source file from being compiled you can add the following comment at the top of the source file.
//nocompile:true
If working in prototyping mode the compiled files will also be copied to prototype/js.
If the SiteAssets folder is mapped and the project is configured properly. The compiled files will also be copied to ${deploymentDir}/js folder.
gulp js:watchSetup a watch on the TypeScript source files, once a source file is changed, the gulp js:compile task is executed.
gulp js:compilegulp resources:compileCopies all resource files i.e. .resx, .spfont, .spcolor files into the ${provisioningDir} which defaults to deploy.
gulp watchA global watch task to wrap all other watches.
gulp js:watchgulp sass:watchgulp pagelayouts:watchgulp masterpages:watchgulp prototype:compileCompiles all prototype templates into the prototype directory.
gulp assets:build:prototypeCopies all assets into prototype/assets directory.
gulp assets:build:sharepointCopies all assets into the SiteAssets mapped drive (if any).
gulp assets:build:distCopies all assets into the dist/assets folder.
gulp assets:buildCopies all assets into dist/assets and prototype/assets and SiteAssets/DeploymentDir/assets.
gulp assets:build:distgulp assets:build:sharepointgulp assets:build:prototypegulp prototype:watchSetup a watch for prototype templates that will run the gulp prototype:compile.
gulp prototype:compilegulp prototypegulp lib:downloadgulp assets:buildgulp lib:compile:jsgulp lib:compile:cssgulp prototype:watchgulp js:watchgulp sass:watchgulp prototype:uploadUploads the contents of the prototype directory to the prototyping server.
The project can be configured through generator-sharepoint-app yeoman generator. The generator provides a CLI to configure the project including:
To configure the project you need to run the following:
$ yo generator-sharepoint-app
Then follow the CLI to select what you want to configure exactly.
The project supports rapid application prototyping through the generator-sharepoint-app. It provides an easy way to quickly create prototypes i.e creates sass files, js files, and html page such that the prototype can run in isolation of any other code.
FAQs
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.