cthulhu-utils-test
v0.0.16
Published
This is a test for the cthulhu-utils to see if we can cleanly separate all of the current functionality
Downloads
68
Readme
Cthulhu-utils
The Cthulhu team will use this repository to put all of their general functions or utilities in a centralised place.
These utilities will be used in every web component that we'll write.
The purpose of this is to keep our web components as clean as possible, as little number of scripts as possible.
scan-css
Represents the functionality that we use to compile our css
css-variables
Create a fallback for each cataloged standalone CSS variables.
Used in index.js which will pass the css tree and the cataloged variables as arguments.
The cataloged variables are passed as a result of the theming functionality.
general-functions
General helper functions
- replaceString
- replace an entire piece of a string with something else
- used in the
index.jsto replace the old CSS with the newly compiled CSS
- replaceCharacter
- replace a single character in a string
- used in the
host-selectors.jsto replace a ')' with a blank space
host-selectors
Create a fallback for the :host()- and :host-selectors in our CSS.
Used in index.js which will pass the css tree and the component name as arguments.
Component is passed on through the npm script in the package.json of each component (configured manually).
theming
Provide a solution for our theming problem, all documented in our Confluence.
Used in index.js which will only pass the css tree as argument.
src-watch
General function to watch for changes in our source directory of every web component.
This watcher will kick-off another build that updates our working directory, to make continuous development possible.
update-package
Node script that will dynamically (based on npm script arguments) increase the version of your package and publish it to npm.
Possible arguments are patch/minor/major.
path-replace
Replace the import path of the component (ES5/ES5-IE) in theindex.js file with a node_modules path => necessary for packaging!
