0.3.2 • Published 5 years ago

@mvllow/pinecone v0.3.2

Weekly downloads
50
License
MIT
Repository
github
Last release
5 years ago

Pinecone

Currently in alpha - API's may change

Dynamically generating theme variants since 2020 ✨

Getting started

Install

  npm install @mvllow/pinecone

Update package.json

{
  "scripts": {
    "generate": "pinecone"
  }
}

Configure pinecone

// pinecone.config.js

module.exports = {
  input: './themes/theme.json',
  dir: './themes',
  prefix: '_',
  themes: [
    {
      name: 'My sorta cool theme',
      slug: 'sorta-cool-filename',
      type: 'dark',
      colors: {
        accent1: '#fa8072',
        accent2: '#3eb489',
      },
    },
    {
      name: 'My less cool theme',
      slug: 'less-cool-filename',
      type: 'dark',
      colors: {
        accent1: '#ea4335',
        accent2: '#4285f4',
      },
    },
  ],
}

Update base theme

With the above config, we would want our theme (input) to look something like this:

{
  "colors": {
    "something.foreground": "_accent1",
    "something.background": "_accent2"
  }
}

Run pinecone

npm run pinecone

This will generate all variants, for example:

{
  "name": "My sorta cool theme",
  "type": "dark",
  "colors": {
    "accent1": "#fa8072",
    "accent2": "#3eb489"
  }
}

{
  "name": "My less cool theme",
  "type": "dark",
  "colors": {
    "accent1": "#ea4335",
    "accent2": "#4285f4"
  }
}

Contributing

Pull requests are welcome and appreciated!

To build from source, run:

npm run build
0.4.0-beta.1

5 years ago

0.4.0

5 years ago

0.3.2

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.0

5 years ago

0.1.0

5 years ago