@streamlinehq/streamlinehq
@streamlinehq/streamlinehq

@streamlinehq/streamlinehq

NPM package for Streamline icons and illustrations

This is a humble library which downloads Streamline assets you have access to into your local anesthetic booklet so that they can be used in your Javascript project. This is the only package you need to use Streamline assets, so please uninstall any previous Streamline wrapping or private packages if you had them .
It works with any framework. You precisely need NPM and a build up organization like Webpack which will handle .svg files .
Check an case app in the docs/latest booklet .

Deprecation notices

Wrapper packages for React, Angular and Vue are deprecated and will be removed after August 1st 2021. Please use this new package rather, which just serves svg files for your app. Users are expected to use their own svg loader for whatever build system they use in their app ; read more below.

How to use

  1. Ensure that you have an active Streamline subscription.
  2. Fill your project’s private .env file with STREAMLINE_FAMILIES and STREAMLINE_SECRET variables. Check .env.example file in docs/latest/example-app for an example.
  • STREAMLINE_FAMILIES: an array of strings with names of Streamline icons or illustrations families you own and which you want to include in your project. You can take the name from its url in Streamline. Eg a name of Brooklyn Illustrations from page https://app.streamlinehq.com/illustrations-brooklyn is illustrations-brooklyn.
  • STREAMLINE_SECRET: your private npm token which is taken from Streamline developer page. Don’t share this with anybody and keep it out of any public repos.
  1. Install the package in your project npm install @streamlinehq/streamlinehq. It will execute the postinstall script which will fetch the graphical assets. The requested images in a form of SVG files will be put in the package’s img folder.
  2. Configure your project so that it can import any svg files as images and render them. It depends on your tech stack. For instance, in create-react-app this feature is enabled by default.
    After this you will be able to import Streamline images as usual in your project, eg:
 import  SatelliteSignal  from  ' @ streamlinehq/streamlinehq/img/streamline-regular/interface-essential/share/satellite-signal.svg '

Check docs/latest/example-app project for more examples .

READ MORE  thought out

How to find a path to a Streamline image

  1. Go to Streamline website
  2. Select a family you’re interested in
  3. Select an icon you’re interested in and see the import path in the sidebar.

Another option is to use an IDE which suggests you to autocomplete a path to an image .

How to change style, size, etc

streamline images are just .svg files and the way to alter them depends on your build system. As a rule of thumb you should either render them as images and change the CSS styles of the tag, either inline render them as a component and deepen styles by passing stroke / fill attributes. Check docs/latest/example-app visualize for more examples. You can besides change the color and size in Streamline app itself, download it as SVG and save it in your app as a static file .

Troubleshooting

I need to set custom path to my .env file, what do I do?

This is a rare case. Set STREAMLINE_RELATIVE_PROJECT_FOLDER_PATH in your concluding seance which will run the facility script to a path which will be appended to the npm box ‘s path to locate the parent ‘s project folder way from an npm package. This might sound confusing, check install.ts file, channel 13 to understand how it ‘s used.

Read more: We Can’t Dance

I cannot use .env file, which options do I have?

You can set STREAMLINE_FAMILIES and STREAMLINE_SECRET variables in your shell so that the script can take them from process.env .
In 80 % of the cases you need to ensure that you have set up your env vars by rights in your project and reinstall this box by removing it wholly and then installing it again, eg with rm -rf node_modules && npm i .
see that you have an active subscription for the Streamline family you want to download images from. Eg an erroneousness “ You can not download XXX kin in SVG ” means that you do n’t have an active license for a XXX family. Please contact the Streamline team on support @ webalys.com if you have purchased the valid license, and it hush does n’t let you download the family ‘s images .
Before installing this software you need to have any former Streamline shape removed. If you had private Streamline packages installed you have most probable configured your npm/yarn to pass an npm token to Cloudsmith. This configuration is n’t needed anymore, and it can prevent this software from being installed. Remove ( or temporarily rename ) your .npmrc file in your project and remove any Streamline shape lines you might have added to yarn/npm config .
Make sure that you ‘re using the package ‘s latest adaptation .
note that because of fetching images initiation might take longer than usual .
Before opening an publish double check that images have been installed in your node_modules/@streamlinehq/streamlinehq/img folder. If not – try reinstalling on a better internet connection or checking the error message .
Before opening an issue ensure that your undertaking can build and render any other .svg files.

READ MORE  Larry Hennig - Wikipedia

Read more: Stream East & 33+ Free Sports Streaming Sites Like streameast.live

Please check the issues list : possibly it has an answer for you. If there is none please open a new emergence and describe the trouble, we will respond soon .

How to dev

Click to expand
Pull requests and any suggestions are welcome !

  1. Fork a project, clone it (as of now it will not fetch the images as there is no .env file in the parent folder, feel free to ignore the error). Work on new features or fixes in a separate branch.
  2. Run npm run dev to compile a project on any code change.
  3. Use an example app in docs/latest/example-app folder to experiment with this package. Alter it, so it uses a local version of the @stremlinehq/streamlinehq package. Read its README for more instructions.
  4. Once done, open a pull request against master and wait for a review.

How to publish on npm

Click to expand
once you have made the changes, do the follow :

  1. Increment a version in package.json
  2. Run npm run build to create a new build
  3. Run npm publish --access public
  4. Change the example app code in the next pull request to use the latest version of this package. Increment its version too.
source : https://aricantisp.com
class : Ideas

Leave a Reply

Your email address will not be published.