Setup environment locally
yarnto install dependencies
yarn buildto check everything is working fine
DocumentationRead docs http://digital-scss.s3-website-us-west-2.amazonaws.com/
Publishing a new version
- By default, release version is patch. But you can change it in the package.json file. There is a prop called
"releaseVersion": "patch",, and there you can set as patch, minor or major according to the release you want to do.
- Then you have to create a PR to publish branch, and a Job in Jenkins will start, and it will generate the new version, and it sends a notification to Slack too.
(Remote) Install the package inside a project
- install the package using npm:
npm install @city-furniture/cityfurniture-scss --save
- install the package using yarn:
yarn add @city-furniture/cityfurniture-scss
(Locally) Install the package inside a project
- To work with the scss package without installing it, we must clone the project cityfurniture-scss, install the packages with
npm installand run the command
- This will take the package and create a symbolic link in the npm global folder to it.
- After this, in order to use the local package inside project we need to open the project into a terminal and run the command
npm link @city-furniture/cityfurniture-scssand the dependency is created between the projects.
Importing the package
- or other importing methods like - inside scss files:
Override the variables:
- inside a scss file from the project we write the following:
$font-weight--thin: 120px; @import '~@city-furniture/cityfurniture-scss/scss/main';
- compile and minify a sass project: https://www.jamesedwards.name/npm-compile-sass
- overriding variables inside scss files: https://medium.com/@bajena3/a-story-about-overriding-scss-variables-and-the-default-keyword-eace1de34631
- creating a step-by-step npm package: https://dev.to/therealdanvega/creating-your-first-npm-package-2ehf
- theming with scss: https://firstname.lastname@example.org/easy-color-theming-with-scss-bc38fd5734d1