Tips and tricks

How to test package in local development with npm

npm link method

on your angular project library, run npm run build projectname

then in Terminal, navigate on dist/projectname and run npm link

this should create a global symlink in the global npm packages folder, you can find it if you run %APPDATA% and go to npm/node_modules, then if you open it with terminal and run ls

notice that l that marks a symlink

if you

npm link libraryname

in your folder, then you should have the same symlink mark

npm pack method

This is an alternative to npm link. npm link but seems undeterministic to me sometimes

First go to your project folder where you have the package.json and run this command

npm run build

find the dist folder and run

npm pack

Now, right click this .tz file and copy the absolute path.

Next go to your package.json and replace your package link with

"yourpackage": ""
{"type":"main_options","images_arr":"'#ffffff'","enable_ajax":"off","soundcloud_apikey":"","bg_isparallax":"off","bg_slideshow_time":"0","bg_transition":"slidedown","site_url":"https:\/\/","theme_url":"https:\/\/\/wp-content\/themes\/qucreative\/","blur_ammount":"26","width_column":"50","width_section_bg":"","width_gap":"30","border_width":"0","border_color":"#ffffff","translate_cancel_comment":"Cancel reply","translate_leave_a_comment":"Leave a comment","translate_leave_a_comment_to":"Leave a comment to","is_customize_preview":"off","width_blur_margin":"30","gallery_w_thumbs_autoplay_videos":"off","content_enviroment_opacity":"30","menu_enviroment_opacity":"70","base_url":"https:\/\/"}