Download wp-calypso/packages/calypso-package-generator/generators/constants.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 1.19 kB
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/packages/calypso-package-generator/generators/constants.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/packages/calypso-package-generator/generators/constants.js
-
curl -L -o constants.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/packages/calypso-package-generator/generators/constants.js
1.19 kB
| import packageExists from '../utils/packageExists.js'; | |
| export const prompts = [ | |
| { | |
| type: 'input', | |
| name: 'name', | |
| message: 'What should the package be called?', | |
| default: '', | |
| validate: ( value ) => { | |
| if ( /.+/.test( value ) ) { | |
| return packageExists( value ) ? 'A package with this name already exists' : true; | |
| } | |
| return 'The name is required'; | |
| }, | |
| }, | |
| { | |
| type: 'input', | |
| name: 'description', | |
| message: 'Type a short description', | |
| default: '', | |
| }, | |
| { | |
| type: 'confirm', | |
| name: 'public', | |
| message: 'Do you want to publish this package?', | |
| default: true, | |
| }, | |
| ]; | |
| export const actions = [ | |
| { | |
| type: 'add', | |
| path: '../{{kebabCase name}}/jest.config.js', | |
| templateFile: 'templates/shared/jest.config.js', | |
| abortOnFail: true, | |
| }, | |
| { | |
| type: 'add', | |
| path: '../{{kebabCase name}}/README.md', | |
| templateFile: 'templates/shared/README.md.hbs', | |
| abortOnFail: true, | |
| }, | |
| { | |
| type: 'add', | |
| path: '../{{kebabCase name}}/tsconfig-cjs.json', | |
| templateFile: 'templates/shared/tsconfig-cjs.json', | |
| abortOnFail: true, | |
| }, | |
| { | |
| type: 'add', | |
| path: '../{{kebabCase name}}/tsconfig.json', | |
| templateFile: 'templates/shared/tsconfig.json.hbs', | |
| abortOnFail: true, | |
| }, | |
| ]; | |