festi-dgs-lib
v0.1.27
Published
# Updating NPM Package
Downloads
5
Readme
Festi DGS Library
Updating NPM Package
npm run build
to build dist folder for the packagenpm adduser
to add user on npmjs.com- change version in
package.json
npm publish
to publish package
Creating NPM Package
- Install Babel and build the dist folder.
npm install --save-dev @babel/core @babel/cli @babel/preset-env
,npm install -save @babel/polyfill
- In the top-level folder of the project, add a file called
babel.config.json
and add presets - Add script
in
package.json
:"build": "rm -rf dist && NODE_ENV=production babel {HERE SHOULD BE PATH FOR THE LIB FOLDER, FOR EXAMPLE: src} --out-dir dist --copy-files"
- Run the command
npm run build
- Setup
package.json
. Version should always be changed when you upload lib. npm adduser
to add user on npmjs.comnpm publish
to publish package
Installing NPM Package
- required
react
andreact-dom
18.2.0 version andreact-scripts
5.0.1 version npm install festi-dgs-lib/yarn add festi-dgs-lib
- import component
import DGSTable from "festi-dgs-lib/dist/components/DGSTable/DGSTable"