Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
sgmf-scripts
Advanced tools
This repository contains a collection of scrips that are useful for creating Storefront Reference Architecture overlay cartridges. All of the scripts are executable through CLI.
master
branch to main
--help
- Generate help message
--upload [path::String]
- Upload a file to a sandbox. Requires dw.json file at the root directory.
--uploadCartridge [String]
- Upload a cartridge. Requires dw.json file at the root directory.
--test [path::String]
- Run unittests on specified files/directories.
--integration [path::String]
- Run overlay integration tests on specified files/directories.
--cover [--include **/cartridges/**/*.js] [--exclude **/bin/**,**/cartridges/**]
- Run all unittests with coverage report. The include and exclude parameter is meant to limit coverage reporting to the requested paths.
--compile String
- Compile css/js files. - either: css or js
--lint String
- Lint scss/js files. - either: js or css
--createCartridge String
- Create new cartridge structure
--watch
- Watch and upload files
You can install this module from NPM command:
npm install sgmf-scripts --save-dev
npm run test:integration https://hostname/on/demandware.store/Sites-RefArch-Site/en_US
{
"type": "node",
"request": "launch",
"name": "Mocha overlay Integration Tests",
"program": "${workspaceFolder}/../sgmf-scripts/index.js",
"args": [
"--integration",
"test/integration/**/*.js",
"--baseUrl",
"https://hostname/on/demandware.store/Sites-RefArch-Site/en_US",
],
"cwd": "${workspaceFolder}",
"internalConsoleOptions": "openOnSessionStart"
}
}
1. From sgmf-scripts repo root directory
npm link
2. From plugin cartridge root directory
npm link sgmf-scripts
you will see something like this to indicate the link has created :
/Users/xxx/Salesforce/plugin_giftregistry/node_modules/sgmf-scripts -> /usr/local/lib/node_modules/sgmf-scripts -> /Users/xxx/Salesforce/sgmf-scripts
3. To remove the link, just delete the node_modules directory and run npm install again
In order for all commands to work, this script makes a few assumptions:
dw.json
file at the root of your repository, that contains information with the path to your sandbox, as well as username and passwordcartridges
top level folder that contains your cartridgename
property in package.json
matches the name of your cartridge, or if it doesn't, there's a packageName
property with the name of the cartridgepackage.json
contains paths
property, that's of type Array
and contains key/value pairs with name/path to all cartridges that will come below yours. For example, if you are creating a cartridge that will be overlayed on top of app_storefront_base
paths
property will look something like this: [{ "base": "../sfra/cartridges/app_storefront_base"}]
package.json
file contains browserslist
key that specifies which browsers you are targeting, to compile SCSS files with correct prefixes. See https://github.com/ai/browserslist for more detailsFAQs
Scripts for sgmf overlay cartridges
The npm package sgmf-scripts receives a total of 13,859 weekly downloads. As such, sgmf-scripts popularity was classified as popular.
We found that sgmf-scripts demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 9 open source maintainers collaborating on the project.
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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.