kalamuna / kalastatic

:electric_plug: Facilitate the front-end experience through Styleguides and Prototypes
https://kalamuna.github.io/kalastatic/
41 stars 14 forks source link

Kalastatic KSS Builder #524

Open timwasson opened 6 years ago

timwasson commented 6 years ago

From your documents, it says I can use a custom KSS builder: http://kalastatic.readthedocs.io/en/latest/3-Styleguide/

I tried builder: "node_modules/kstat-kss-builder" in my YAML, but this generated errors on build. The only builder I can get working is the default, which is builder/twig. When I insert kstat-kss-builder into my YAML and build, this is my error:

Error: Command failed: /bin/sh -c node_modules/.bin/kalastatic build Usage: kss [options]

File locations: --source Source directory to recursively parse for KSS comments, homepage, and markup [string] --destination Destination directory of style guide [string] [default: "styleguide"] --json Output a JSON object instead of building a style guide [boolean] --mask, -m Use a mask for detecting files containing KSS comments [string] [default: ".css|.less|.sass|.scss|.styl|.stylus"] --config, -c Load the kss options from a json file

Builder: --clone Clone a style guide builder to customize [string] --builder, -b Use the specified builder when building your style guide [string] [default: "node_modules/kalastatic/node_modules/kss/builder/handlebars"]

Style guide: --css URL of a CSS file to include in the style guide [string] --js URL of a JavaScript file to include in the style guide [string] --custom Process a custom property name when parsing KSS comments [string] --extend Location of modules to extend the templating system; see http://bit.ly/kss-wiki [string] --homepage File name of the homepage's Markdown file [string] [default: "homepage.md"] --markup Render "markup" templates to HTML with the placeholder text [boolean] [default: false] --placeholder Placeholder text to use for modifier classes [string] [default: "[modifier class]"] --nav-depth Limit the navigation to the depth specified [default: 3] --title Title of the style guide [string] [default: "KSS Style Guide"]

Options: --verbose Display verbose details while building [count] --demo Builds a KSS demo. [boolean] [default: false] --// Comments in JSON files will be ignored --help, -h, -? Show help [boolean] --version 3.0.0-beta.18 [boolean]

Unknown arguments: extend-drupal8, namespace`

soniktrooth commented 6 years ago

@timwasson did you add kstat-kss-builder as a dependency in your package.json?

timwasson commented 6 years ago

I did. This is my dependencies:

"dependencies": { "gulp": "^3.9.1", "gulp-exec": "^2.1.3", "gulp-sass": "^3.1.0", "kalastatic": "^3.2.0", "kstat-kss-builder": "^0.13.5", "mkdirp": "^0.5.1", "twig-drupal-filters": "^1.1.0" }

soniktrooth commented 6 years ago

In that case I think @RobLoach is more adept at fielding this one.

RobLoach commented 6 years ago

@timwasson Thanks for posting in the queue. Once https://github.com/kalamuna/kalastatic/pull/525 is in, you'll want to disable the twig extensions in your KSS conf....

kss:
  twig: false

@soniktrooth Mind giving a review? Thanks!

@timwasson Also, node_modules/kstat-kss-builder is now the default, and comes packed in. I'll update those docs. Thanks for the note.