Meet npm Pro: unlimited public & private packages + package-based permissions.Learn more »

generator-optinoud

1.2.0 • Public • Published

Optinoud Yeoman generator

Generate an Optinoud instance wherever you like.

Optinoud lets you write ES6+ and SASS snippets, while transpiling to ES5+CSS, and live injecting it into a specified website.

How to generate

Open a Terminal window and navigate to the folder where you want to generate an Optinoud setup:

cd /path/to/folder

Then initiate Optinoud through npx, and follow the steps:

npx -p yo -p generator-optinoud -c 'yo optinoud'

Using Optinoud

In your project directory, just run:

npm start

By default, it will load /src/variant.js, transpile it to ES5, and inject it into the website specified while running Optinoud.

You can load alternative scripts by using the optinoud URL parameter. E.g: ?optinoud=example will load /src/example.js.

Adding SASS

To add static CSS, create a .scss file with the same filename as the .js file in /src. The SASS file will get transpiled to CSS, and inserted into the .js file in /dist.

Adding images

To add images, just drop them in the /src folder. These will now be relatively accessible through the URL, i.e. /example.jpg.

Install

npm i generator-optinoud

DownloadsWeekly Downloads

10

Version

1.2.0

License

ISC

Unpacked Size

7.17 kB

Total Files

8

Last publish

Collaborators

  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar