2.1.0 • Published 3 years ago

@esss-swap/duo-validation v2.1.0

Weekly downloads
185
License
ISC
Repository
github
Last release
3 years ago

User Office shared libraries

Adding new packages

To create a new package, you can copy and rename the .templates/new-package to packages folder.

$ cp -r ./.templates/new-package/ ./packages/__PACKAGE_NAME__

Then you have to update the name field package.json.

"name": "@esss-swap/",      ->      "name": "@esss-swap/__PACKAGE_NAME__",

If you need additional configuration you feel free to do so.

In the next step you have to update the paths property in the root tsconfig.json with the new package:

    "paths": {
      "@esss-swap/duo-logger": ["logger/src"],
      "@esss-swap/duo-localisation": ["localisation/src"],
      "@esss-swap/__PACKAGE_NAME__": ["__PACKAGE_NAME__/src"],
    }

Adding dependencies

If your package has external dependencies (usually it does) you can do so by using Lerna (only one package can be added per command):

Adding new dependency for every package:

$ lerna add <package>[@version] [--dev] [--exact] [--peer]

Adding new dependency for a selected package:

$ lerna add <package> packages/__PACKAGE_NAME__

More details information on Lerna's page: https://github.com/lerna/lerna/tree/master/commands/add

Publishing new version

Before publishing new version it's recommended to run npm run lerna:prePublish in order to update package-lock.json with the new version number. \ By default in case of a new push to the master branch a Github action will be triggered, which will check if there are any updated packages - updated means it has a version number which does not exist in NPM registry. If there are it will publish the new packages. \ Every package should have a build command which compiles TS to JS using a proper tsconfig.

Useful NPM scripts

# Installs the packages' dependencies and links local packages
$ npm run lerna:bootstrap

# Runs the `build` script in every package which contains this script in its `package.json`
$ npm run lerna:build

# Runs the `test` script in every package which contains this script in its `package.json`
$ npm run lerna:test

# Removes the `node_modules` folders from all packages
# Runs the `clean` script in every package which contains this script in its `package.json`
$ npm run clean

# Runs `npm run clean` to remove node_modules and built files
# Runs `npm run lerna:bootstrap` to install the dependencies and to update `package-lock.json`
# Runs `npm run lerna:build` just to make sure everything still works properly
$ npm run lerna:prePublish
2.1.0

3 years ago

2.0.7

3 years ago

2.0.8

3 years ago

2.0.6

3 years ago

2.0.5

3 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.4

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.2.6

3 years ago

1.2.5

3 years ago

1.2.4

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.1.47

3 years ago

1.1.46

3 years ago

1.1.45

3 years ago

1.1.44

3 years ago

1.1.43

3 years ago

1.1.42

3 years ago

1.1.41

3 years ago

1.1.40

3 years ago

1.1.39

3 years ago

1.1.38

3 years ago

1.1.37

4 years ago

1.1.36

4 years ago

1.1.34

4 years ago

1.1.35

4 years ago

1.1.33

4 years ago

1.1.32

4 years ago

1.1.31

4 years ago

1.1.30

4 years ago

1.1.28

4 years ago

1.1.29

4 years ago

1.1.27

4 years ago

1.1.26

4 years ago

1.1.25

4 years ago

1.1.24

4 years ago

1.1.23

4 years ago

1.1.22

4 years ago

1.1.21

4 years ago

1.1.20

4 years ago

1.1.19

4 years ago

1.1.18

4 years ago

1.1.17

4 years ago

1.1.16

4 years ago

1.1.15

4 years ago

1.1.14

4 years ago

1.1.13

4 years ago

1.1.12

4 years ago

1.1.11

4 years ago

1.1.9

4 years ago

1.1.10

4 years ago

1.1.8

4 years ago

1.1.7

4 years ago

1.1.6

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.9

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago