create-webcore
v0.9.6
Published
A CLI for creating new Webcore projects
Maintainers
Readme
Create Webcore
A CLI for creating new Webcore projects. Run the following in your terminal to create a new Webcore project:
npm create webcore@latestYou can update configuration files only in an existing project by passing config as a param to the CLI:
npm create webcore configTo add blocks into your project, you can use the following command:
npm create webcore add [block]
npm create webcore add [block] components # Add to "components" folder
npm create webcore add all # Add all blocksFor example, to add the Author block, you can execute npm create webcore add Author in your terminal.
To bootstrap a new Webcore project using a template, pass the following to your CLI:
npm create webcore template [template] [directory]
npm create webcore template Portfolio # Creates a new project with the portfolio template in the current directory
npm create webcore template Portfolio ./portfolio # Creates the project in the "portfolio" directoryAPI
You can also use create-webcore programmatically:
import { create, createConfig, add, createTemplate } from 'create-webcore'
// Create a new Webcore project
create({
dir: './', // Your cwd where the project will be bootstrapped
framework: 'astro', // Can be one of `astro` | `svelte` | `react`
})
// Update configuration files in an existing Astro project
createConfig({
sass: '1.94.2', // You can optionally specify package versions
ts: '5.9.3',
webcoreui: '1.3.0'
})
// Add the specified block to your project.
await add('Author')
await add('Author', 'components') // Add Author to src/components
await add('Author', 'blocks', true) // Add Author to src/blocks, overwrite file if exists
await add('all') // Add all blocks
// Bootstrap a new project with a template
await createTemplate(template, outdir)
await createTemplate('Portfolio', './')You can find available blocks in the README of our GitHub repository. You can find the list of available templates here. When bootstrapping a new project with a template, reference the name of the template folder. For more documentation on how to use Webcore, visit webcoreui.dev.
