
Security News
Node.js TSC Votes to Stop Distributing Corepack
Corepack will be phased out from future Node.js releases following a TSC vote.
@transferwise/files-scaffold
Advanced tools
This package provides a simple utility to speed up the creation of new templated files. It also helps to enforce consistency across ypur codebase by forcing developers to use the templated files that have been specified.
yarn add -D @transferwise/files-scaffold
or
npm install --save-dev @transferwise/files-scaffold
To use the scaffold utils in your project please add the following script to your package.json
"your-script-command-name": "files-scaffold"
In order to use files-scaffold
command you need to specify a .scaffold-templates
directory
In this directory you need to add your templates that files-scaffold is going to use to generate your files.
A template files is a js
file that exports an object. Currently the template object supports the following properties
module.export {
type: 'your',
path: 'packages/components/src',
ext: 'js',
createDir: true,
name: (name) => capitalizeFirstLetter(name),
template: (name) => `import React from "react";
import Types from "prop-types";
...`
}
type | description | |
---|---|---|
type | string | Used mostly for the success message to identify the newly created files |
path | string | Path relative to the package.json that contains your "your-script-command-name" Where your file is going to be created |
ext | string | The extension to be used for your file |
createDir | bool | This determines if the file has to be added as single file or it needs to be created inside a directory with the name decided in the prompt |
name | function | The name of the file. This function accepts the name chosen in the prompt |
template | function | The content of your file. This function accepts the name chosen in the prompt |
When running your-script-command-name
you'll be prompted to a series of questions on your CLI. Once everyhting has been answered your files will be created under following the path you specificed inside your templates.
FAQs
Simple utility to scaffold components
The npm package @transferwise/files-scaffold receives a total of 0 weekly downloads. As such, @transferwise/files-scaffold popularity was classified as not popular.
We found that @transferwise/files-scaffold demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 309 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
Corepack will be phased out from future Node.js releases following a TSC vote.
Research
Security News
Research uncovers Black Basta's plans to exploit package registries for ransomware delivery alongside evidence of similar attacks already targeting open source ecosystems.
Security News
Oxlint's beta release introduces 500+ built-in linting rules while delivering twice the speed of previous versions, with future support planned for custom plugins and improved IDE integration.