{"id":48180,"library":"init-roll","title":"init-roll","description":"A framework for project creation and migration, used to power create-xxx or @xxx/create-xxx packages. Current version is 1.4.0 (stable). Provides a simple API to initialize projects from templates with support for EJS templates, file strategies (delete, default, override), and JSON merging/deletion. Unlike Yeoman or other scaffolding tools, init-roll focuses on template-based initialization with built-in file conflict handling and package.json manipulation. Released under MIT license.","status":"active","version":"1.4.0","language":"javascript","source_language":"en","source_url":"https://github.com/guoyunhe/init-roll","tags":["javascript","node","cli","typescript"],"install":[{"cmd":"npm install init-roll","lang":"bash","label":"npm"},{"cmd":"yarn add init-roll","lang":"bash","label":"yarn"},{"cmd":"pnpm add init-roll","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Used for template compilation (support for EJS syntax in template files and names).","package":"ejs","optional":false}],"imports":[{"note":"The default export is not available; init is a named export.","wrong":"import init from 'init-roll'","symbol":"init","correct":"import { init } from 'init-roll'"},{"note":"Type-only import for TypeScript users.","wrong":"import { InitOptions } from 'init-roll'","symbol":"InitOptions","correct":"import type { InitOptions } from 'init-roll'"},{"note":"CommonJS requires destructuring named exports.","wrong":"const init = require('init-roll')","symbol":"require('init-roll')","correct":"const { init } = require('init-roll')"}],"quickstart":{"code":"import { init } from 'init-roll';\n\nawait init('/path/to/template', '/path/to/project', {\n  name: 'my-app',\n  description: 'My awesome app',\n  version: '1.0.0',\n});\n\nconsole.log('Project created successfully!');","lang":"typescript","description":"Creates a project from a template directory using EJS parameters. The first argument is the template path, second is the output project path, third is an object of template variables."},"warnings":[{"fix":"Rename the file to avoid the reserved extension or use a different naming convention.","message":"Template files with .default, .override, .delete extensions are processed as special strategies. If you want a literal file named 'file.default', you must escape or avoid these suffixes.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Pin version to 1.4.0 or use package-lock.json.","message":"The package API may change in future major versions. Always specify exact version in package.json.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Ensure template variable values are filesystem-safe (no slashes, etc.).","message":"EJS syntax in template file names (e.g., src/<%= name %>.js) is supported but may cause confusion if the name contains special characters.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'1.4.0':23 'api':28 'base':60 'built':64 'built-in':63 'cli':78 'conflict':67 'creat':15 'create-xxx':14 'creation':8 'current':20 'default':42 'delet':41 'ej':37 'file':39,66 'focus':56 'framework':5 'handl':68 'init':2,54 'init-rol':1,53 'initi':30,61 'javascript':76 'json':45 'licens':75 'manipul':71 'merging/deletion':46 'migrat':10 'mit':74 'node':77 'overrid':43 'packag':19 'package.json':70 'power':13 'project':7,31 'provid':25 'releas':72 'roll':3,55 'scaffold':51 'simpl':27 'stabl':24 'strategi':40 'support':35 'templat':33,38,59 'template-bas':58 'tool':52 'typescript':79 'unlik':47 'use':11 'version':21 'xxx':16 'xxx/create-xxx':18 'yeoman':48","created_at":"2026-06-07T16:55:19.343496+00:00","updated_at":"2026-06-07T16:55:19.343496+00:00","problems":[{"fix":"Run 'npm install --save init-roll' (or --save-dev if only for development).","cause":"Package not installed, or installed as dev dependency but import is used in production.","error":"Cannot find module 'init-roll'"},{"fix":"Change 'import init from \"init-roll\"' to 'import { init } from \"init-roll\"'.","cause":"Default import used instead of named import.","error":"TypeError: init is not a function"},{"fix":"Set 'type': 'module' in package.json or use .mjs extension, or use require syntax.","cause":"Using ESM syntax in a CommonJS environment without proper module type.","error":"SyntaxError: Unexpected token '?'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/guoyunhe/init-roll#readme","github":"https://github.com/guoyunhe/init-roll","docs":null,"changelog":null,"pypi":null,"npm":"init-roll","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}