1.0.21 • Published 3 years ago

@wazzifa/common v1.0.21

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

1- extract authentication related login into separate dependency

you have 3 ways: 1- Copy/Paste --> Worst option 2- GIT sub module 3- Publish common code as npm package registery 4- We have again 3 options: - Public npm - *Organization (public / private) - Self hosted npm server. 5- Let's create new project called common (npm init -y) 6- You must have your common library committed into git repos (init, add, commit) 7- Publish the package using (npm publish --access public)

To make our common libraries agnostic and work with any porject (type script, or java script) we we will write our library in type script but publish it as java script. to do so follow these steps: 1- tsc --init (create tsconfig.json file) 2- install type script (npm install typescript del-cli --save-dev) 3- transpile the type script to java script:

  • in application.config -- scripts sections -- add build command, and clean -- and modify tscconfig.json to let tsc know where is the code is uncomment declaration uncomment outDir and make it "./build" 4- when you import from the module the main config determines what file to be loaded, we need to make sure it is the index.js located in the build folder not src. add also (after the main config), the "types" : "./build/index.s.ts" wat is the main type defintion "files" : "./build/*/" everything in build what set of files we wnat to make sure it must be included in publish
1.0.21

3 years ago

1.0.18

3 years ago

1.0.20

3 years ago

1.0.17

3 years ago

1.0.16

3 years ago

1.0.11

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.12

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.0

3 years ago