Link Search Menu Expand Document


We will use makesjs/demo2. Try it with:

npx makes makesjs/demo2 # or npx makes makesjs/demo2 my-app

makes-demo2 screenshot

This demo skeleton defined an optional file questions.js, plus some feature folders nodejs and ruby (we will talk about them in next page).

─ questions.js
─ common/
  ├── LICENSE__if_license
─ nodejs/
  ├── .babelrc__if_babel
  ├── .gitignore
  ├── index.js__if_not_babel_and_not_typescript
  ├── package.json
  └── src/
      ├── index.js__if_babel
      └── index.ts__if_typescript
─ ruby/
  └── main.rb

The optional questions.js file needs to provide an array of questions. “makes” support CommonJS and ESM. For simplicity, “makes” doesn’t support any Babel/TypeScript transpiling. It must be written in pain CommonJS/ESM format which Node.js can understand.

To use CommonJS format, use file name questions.js or questions.cjs with following content:

module.exports = [
  // list of questions...

To use ESM format, use file name questions.mjs or questions.js with additional package.json with "type": "module" (so that Nodejs will treat any JS file in your skeleton with ESM format):


export default [
  // list of questions ...

package.json, only needed if you use file name questions.js for ESM code.

{ "type": "module" }

For more information, please review CommonJS/ESM support.

“makes” supports only three types of questions: text prompt, select prompt, multi-select prompt. These prompts are based on prompts, but customised and simplified.

Table of contents