@devdezyn/ticketeer-common
v1.0.20
Published
This is my React core library.
Downloads
33
Readme
Ticketeer Common
This is my React core library.
Table of Contents
(1.) Initialize Node Project (2.) Update the "name" property in package.json
(1.) Initialize Node Project
npm init -y
(2.) Update the "name" property in package.json
{
"name": "@devdezyn/ticketeer-common",
}
(3.) Setup typescript & build process
npm i --save-dev typescript del-cli
npx tsc --init
<!-- tsconfig.json -->
{
"compilerOptions": {
"declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
"outDir": "./build", /* Specify an output folder for all emitted files. */
}
}
(4.) Modify package.json
<!-- "main": -->
<!-- "types":-->
<!-- "files": -->
{
"main": "./build/index.js",
"types": "./build/index.d.ts",
"files": [
"build/**/*"
],
"scripts": {
"clean": "del ./build/*",
"build": "npm run clean && tsc",
},
}
(5.) Ensure all required type definitions are installed as devDependencies (Possible "property" does not exist on type errors)
npm install --save-dev @types/cookie-session
(6.) Initialize git and commit changes
git init
git add .
<!-- optional -->
git status
git commit -m "commit message"
(7.) Push to NPM
npm login
npm publish --access public
(8.) Workflow 1 (Recommended)
Make changes to project
git status
git add .
git commit -m "commit message"
git status
npm version patch
<!-- npm run build will run npm run clean first based on its script definition-->
npm run build
npm publish --access public
(9.) Workflow 2
{
"scripts": {
"pub": "git add . && git commit -m \"Updates\" && npm version patch && npm run build && npm publish"
},
}
Make changes to project
npm run pub