star-wars-intro-creator
v1.0.0
Published
A simple utility for creating Star Wars style scrolling text intros
Downloads
2
Maintainers
Readme
Star Wars Intro Creator
A simple Node.js library for generating Star Wars style scrolling text intros. Powered by Star Wars Intro Creator.
Features
- Generate Star Wars style scrolling text intros
- Customize intro text, logo, and background
- Export to HTML format
- Easy to use API and CLI interface
- Fully customizable text styling and speed
- Support for multiple languages
Installation
# Install globally
npm install -g star-wars-intro-creator
# Or install locally in your project
npm install star-wars-intro-creatorUsage
CLI
# Basic usage
star-wars-intro --title "Episode IV" --subtitle "A NEW HOPE" --text "It is a period of civil war. Rebel spaceships, striking from a hidden base, have won their first victory against the evil Galactic Empire..." --output intro.html
# Show help
star-wars-intro --helpAPI
const StarWarsIntro = require('star-wars-intro-creator');
// Create a new intro
const intro = new StarWarsIntro({
title: 'Episode IV',
subtitle: 'A NEW HOPE',
text: 'It is a period of civil war. Rebel spaceships, striking from a hidden base, have won their first victory against the evil Galactic Empire...',
logo: 'default', // or 'custom' with logoUrl
speed: 'medium' // slow, medium, fast
});
// Generate HTML
const html = intro.toHTML();
// Save to file
intro.saveToFile('intro.html');Options
| Option | Description | Default | |--------|-------------|---------| | title | The episode title (e.g., "Episode IV") | "Episode" | | subtitle | The subtitle (e.g., "A NEW HOPE") | "SUBTITLE" | | text | The main scrolling text | "Lorem ipsum..." | | logo | The logo type: "default" or "custom" | "default" | | logoUrl | URL to custom logo (used if logo is "custom") | null | | speed | The scroll speed: "slow", "medium", or "fast" | "medium" | | backgroundColor | Background color | "#000000" | | fontColor | Text color | "#FFE81F" |
Examples
Basic Intro
const StarWarsIntro = require('star-wars-intro-creator');
const intro = new StarWarsIntro({
title: 'Episode IV',
subtitle: 'A NEW HOPE',
text: `It is a period of civil war.
Rebel spaceships, striking
from a hidden base, have won
their first victory against
the evil Galactic Empire.
During the battle, Rebel
spies managed to steal secret
plans to the Empire's
ultimate weapon, the DEATH
STAR, an armored space
station with enough power
to destroy an entire planet.`
});
intro.saveToFile('intro.html');Custom Intro
const StarWarsIntro = require('star-wars-intro-creator');
const intro = new StarWarsIntro({
title: 'Episode I',
subtitle: 'THE PHANTOM MENACE',
text: 'Turmoil has engulfed the Galactic Republic...',
logo: 'custom',
logoUrl: 'path/to/custom-logo.png',
speed: 'slow',
backgroundColor: '#000033',
fontColor: '#87CEEB'
});
intro.saveToFile('custom-intro.html');License
MIT
About
This package provides a simple way to generate Star Wars style intros for your projects. For more advanced features and a visual editor, check out Star Wars Intro Creator.
