generator-optinoud

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

Usage no npm install needed!

<script type="module">
  import generatorOptinoud from 'https://cdn.skypack.dev/generator-optinoud';
</script>

README

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.