Skip to content
/ create Public

A tiny command line utility to create files in a cross-platform way.

License

Notifications You must be signed in to change notification settings

11ty/create

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@11ty/create

A tiny command line utility to create files in a cross-platform way. Requires Node 18 or newer.

In the quick start for Eleventy, there are different commands folks need to use based on their operating system and terminal application.

# POSIX and PowerShell Core (Windows)
echo '# Header' > index.md

# Command Prompt (Windows cmd.exe, no quotes allowed)
echo # Header > index.md

# Windows PowerShell (`>` defaults to UTF16)
echo '# Header' | out-file -encoding utf8 'index.md'

Now we can tell folks to use this everywhere and we’ll always have a UTF8 encoded file at the end:

npx @11ty/create index.md '# Heading'
npx @11ty/create nested/index.md '# Heading'

Installation happens on-the-fly via npx and we needn’t put this in a package.json.

About

A tiny command line utility to create files in a cross-platform way.

Resources

License

Stars

Watchers

Forks

Packages

No packages published