@datawheel/create-bespoke-site
v1.0.3
Published
This script initializes a new project using the `@datawheel/bespoke` package.
Keywords
Readme
Create Bespoke Site
This script initializes a new project using the @datawheel/bespoke package.
Usage
Install the package:
npm i @datawheel/create-bespoke-siteRun the following command to create a new project:
npx create-bespoke-site <project-name><project-name>: The name of the folder where the project will be created. Defaults tomy-siteif not provided.
What It Does
- Creates a new directory with the specified project name.
- Initializes a new
package.jsonfile in the directory. - Installs the latest version of the
@datawheel/bespokepackage.
Example
npx create-bespoke-site my-new-siteThis will:
- Create a folder named
my-new-site. - Initialize a new Node.js project inside it.
- Install the
@datawheel/bespokepackage. - Add a starter
index.jsfile.
Notes
- Ensure you have Node.js and npm installed on your system.
- If the specified directory already exists, the script will terminate with an error.
Using Locally with npm link
To test the script locally without publishing it to npm:
Navigate to the directory containing the script:
cd /route/to/repo/reports/packages/create-bespoke-siteRun the following command to link the package globally:
npm linkUse the script with
npxas if it were published:npx create-bespoke-site <project-name>To unlink the package when done:
npm unlink
