obewds / vite-vue-ts-compo-pkg-starter Goto Github PK
View Code? Open in Web Editor NEWA OBE:WDS Vite/Vue TypeScript component package development kit with Tailwind CSS, VitePress and Vitest integrations
License: MIT License
A OBE:WDS Vite/Vue TypeScript component package development kit with Tailwind CSS, VitePress and Vitest integrations
License: MIT License
List of Utility Packages (GitHub + NPM)
Component Packages (GitHub + NPM)
Tailwind Defaults Packages (GitHub + NPM)
Replace @obewds/tw-bg-palette-console repo with starter based repo
Parent Epic Issue: #70
Replace/remove Init-focused content in @obewds/vue-el files so all can be removed after init:as is/was run.
Have learned and tested out how to add automatic changelog logging and automated Git tagging (opening up release tags getting generated just after a publish to npm!
The above changes need to be done for the following repositories:
From non-dependent packages to dependent packages - so update these in order when bumping versions!
From non-dependent packages to dependent packages - so update these in order when bumping versions!
From non-dependent packages to dependent packages - so update these in order when bumping versions!
To ripple this change out to all derivative OBE:WDS repos created from this starter kit, complete each of the following steps in each derivative repo:
Install the following new dependency:
npm install auto-changelog --save-dev
Change the following lines in the repo's ./package.json
file from this:
{
"scripts": {
"publish:prep": "npx rimraf dist && npm run pkg:tsbundle",
"publish:package": "npm run publish:prep && npm run pkg:org && npm run pkg:login && npm run pkg:publish",
},
}
To this:
{
"scripts": {
"changelog": "auto-changelog --package --unreleased --backfill-limit 20",
"git:tag" : "PACKAGE_VERSION=$(cat package.json | grep \\\"version\\\" | head -1 | awk -F: '{ print $2 }' | sed 's/[\",]//g' | tr -d '[[:space:]]') && git tag v$PACKAGE_VERSION && git push --tags",
"publish:prep": "npx rimraf dist && npm run pkg:tsbundle && npm run changelog",
"publish:package": "npm run publish:prep && npm run pkg:org && npm run pkg:login && npm run pkg:publish && npm run git:tag && npm run changelog"
},
}
Open up the project's main ./README.md
file and add the following link underneath the link to the repo's GitHub docs site:
Or check out the [CHANGELOG](https://github.com/obewds/vite-vue-ts-compo-pkg-starter/blob/main/CHANGELOG.md) for the code base!
It's never a bad idea to go ahead and do a dependency updates check using the following commands:
npm outdated
And then update outdated packages either manually by replacing outdated deps one-by-one, or all together with:
npm update
And lastly, be sure to run a publish prep script to generate a new changelog:
npm run publish:prep
Or in the case of needing to go ahead and publish an update (for example if bumping dependencies while making these changes), then go ahead and run the package:prep
script above and make a quick commit of the files for GitHub, and then make another final commit of the newest ./CHANGELOG.md
file generated after running the following script:
npm run publish:package
Ensure the following packages are installed/arranged in the ./package.json
file (either as dev dep or manually as peer dep depending on the component):
The above changes need to be done for the following repositories:
From non-dependent packages to dependent packages - so update these in order when bumping versions!
From non-dependent packages to dependent packages - so update these in order when bumping versions!
From non-dependent packages to dependent packages - so update these in order when bumping versions!
Replace @obewds/tw-bg-palette-monochromatic repo with starter based repo
Parent Epic Issue: #70
Replace/remove Init-focused content in @obewds/obewds-tw-config files so all can be removed after init:as is/was run.
Parent Epic Task: #69
Replace/remove Init-focused content in @obewds/vue-tw-inline files so all can be removed after init:as is/was run.
Parent Epic Task: #69
List of Utility Packages (GitHub + NPM)
From non-dependency packages to dependent packages - so update these in order when bumping versions!
Component Packages (GitHub + NPM)
Tailwind Defaults Packages (GitHub + NPM)
STEP 0: Edit the homepage property value in ./package.json
{
"description": "The @obewds/repo-name-here modular design system component for Vue.js",
"homepage": "https://obewds.github.io/repo-name-here/",
}
STEP 1: Remove this line from ./package.json
"scripts": {
// remove this line below
"init:as": "node scripts/init.js"
}
STEP 2: Remove the file ./scripts/init.js
STEP 3: Create file and copy code from the repo link below for ./src/app/HelpContent.vue
https://github.com/obewds/vite-vue-ts-compo-pkg-starter/blob/main/src/app/HelpContent.vue
STEP 4: Create file and copy code from the repo link below for ./src/app/InitContent.vue
https://github.com/obewds/vite-vue-ts-compo-pkg-starter/blob/main/src/app/InitContent.vue
STEP 5: Add code to ./tailwind.config.js
module.exports = {
// ...
content: [
"./index.html",
"./src/**/*.{vue,js,ts,jsx,tsx}",
// PROVIDES TAILWIND OBE:WDS DEFAULT DESIGN SYSTEM CLASSES
"./node_modules/@obewds/obewds-tw-config/dist/*.js",
],
safelist: [
// Include to ensure TW can parse all app config default classes
JSON.stringify(require('./obewds.tw.config.json'), null, 0),
],
// theme: {
// extend: {},
// },
// ...
}
STEP 6: Add code to ./src/main.ts
// ADD THIS LINE
// import tw from '../obewds.tw.config.json'
const app = createApp(App)
// ADD THIS LINE
// app.provide('tw', tw)
// ADD THIS PROVIDE
app.provide('globals', {
classes: {
btn: 'inline text-white rounded px-2 py-1 shadow',
h2: 'text-lg font-bold',
},
strings: {
more: 'more things',
less: 'less things',
},
styles: {
btn: 'background-color:#42b983;',
},
})
STEP 7: Delete/replace file and copy code from the repo link below for ./obewds.tw.config.json
https://github.com/obewds/vite-vue-ts-compo-pkg-starter/blob/main/obewds.tw.config.json
STEP 8: Install @obewds/obewds-tw-config to match the new starter template's ./src/main.ts
npm install @obewds/obewds-tw-config --save-dev
Replace/remove Init-focused content in @obewds/vue-tw-el files so all can be removed after init:as is/was run.
Parent Epic Task: #69
Replace/remove Init-focused content in @obewds/vue-validators files so all can be removed after init:as is/was run.
Parent Epic Task: #69
Replace @obewds/tw-text-palette-default repo with starter based repo
Parent Epic Issue: #70
Replace @obewds/vue-tw-el repo with starter based repo
Parent Epic Issue: #70
Replace @obewds/tw-bg-palette-pastel repo with starter based repo
Parent Epic Issue: #70
Replace @obewds/vue-el repo with starter based repo
Parent Epic Issue: #70
Replace @obewds/tw-bg-palette-default repo with starter based repo
Parent Epic Issue: #70
Replace/remove Init-focused content in @obewds/vue-tw-block files so all can be removed after init:as is/was run.
Parent Epic Task: #69
Replace/remove Init-focused content in @obewds/vue-component-helpers files so all can be removed after init:as is/was run.
Parent Epic Task: #69
Replace @obewds/tw-border-palette-default repo with starter based repo
Parent Epic Issue: #70
Will need to keep the npm version number the same - and ensure gh-pages gets up and running, too.
Also need to ideally minimize downtime to less than 5-10 min.
Component Packages (GitHub + NPM)
Tailwind Defaults Packages (GitHub + NPM)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.