toolkit 4.154.2
Install from the command line:
Learn more about npm packages
$ npm install @esolidar/toolkit@4.154.2
Install via package.json:
"@esolidar/toolkit": "4.154.2"
About this version
Toolkit for building eSolidar Projects.
eSolidar Storybook »
- Quick start
- Before installing the package
- Install package
- Publish package
- Using sass
- Documentation
- Copyright and license
Steps to set up the project locally:
- Clone the repo:
git clone https://github.com/esolidar/toolkit.git
- Run
yarn
to install all dependencies. - Run
yarn storybook
to start the storybook. - Open
http://localhost:6006
in your browser, and voilà. - Tests
- Run
yarn test
to run all components tests. - Run
yarn test --coverage
to run tests, coverage analysis and report. - Run
yarn test:lint
to run eslint analysis. - Builds
- Run
yarn build-storybook
to create a production build for the toolkit documentation. - Run
yarn build
to create a production build for the package. - Rum
yarn build:publish
to create a production build and publish the new version package. - Run
yarn clean
to delete the build (lib folder) locally.
- Create access token with [Permissions: repo / write:packages / read:packages / delete:packages].
- Add Token to global ~/.npmrc file. Open the shell and do C:>code ~/.npmrc to open the file, then add the following line:
//npm.pkg.github.com/:_authToken=TOKEN
-
Or login on the command line:
npm login --registry=https://npm.pkg.github.com
- In the same directory as your package.json file, create or edit an .npmrc file to include a line specifying GitHub Package Registry URL and the account esolidar:
@esolidar:registry=https://npm.pkg.github.com
- Run
yarn add @esolidar/toolkit
If you want to use our package, just follow these instructions:
yarn add -D @esolidar/toolkit
"@esolidar/toolkit": "LAST_VERSION"
Steps to publish the package: Publish package and documentation is automatic, when was a merge to master an action will do it. To publish manually follow this steps:
- Update package.json and change package version.
- Update README file in all places where the version is referenced.
- Run
yarn build-storybook
to build and push the new library version to the storybook. - Add all changes to git (pull/add/commit/push)
- Run
yarn build:publish
This library uses sass, so it is mandatory that the React project has sass loaders.
Include the following import:
import '~@esolidar/toolkit/lib/assets/sass/main';
If you only want to include the style for the component you used, just include the scss of the component in question, ex:
/* Need to import variables as well */
import '~@esolidar/toolkit/lib/assets/sass/variables';
import '~@esolidar/toolkit/lib/assets/sass/footer';
To override the styles used in the library components, simply override the following sass variables:
Then, you must create a sass file in your project and include the following import: (variables before the library)
$mainColor : red;
@import '~@esolidar/toolkit/lib/assets/sass/main';
The eSolidar Toolkit documentation, included in this repo in the root directory on /storybook-static
, is built with storybook. The docs may also be run locally with the command line build-storybook
.
©2020 eSolidar. All rights reversed. Code released under the MIT License.
- Use env constants everywhere in the project