Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(library-builder): builder #3609

Draft
wants to merge 26 commits into
base: develop
Choose a base branch
from

Conversation

m0ksem
Copy link
Contributor

@m0ksem m0ksem commented Jul 12, 2023

closes #3305

Builds:

  • ESM
  • ESM-NODE - esm without CSS (used in nuxt SSR and vitest)
  • IIFE - for browsers
  • CJS - for node (mostly used in vite-ssr)
  • Styles - style modules that can be easily removed
  • Webcomponents
  • Nuxt module - nuxt module in lib/nuxt
  • Types - type declarations
  • Meta - some meta information about exports, components, composables.
  • main.css - must include all css used in lib and styles
  • Include bundler tests?
  • Easy to use CLI
    • --target arguments so user can exclude nuxt module or web-components for example
    • --componentName and componentPath regex patterns (Vuestic exports VaToastPlugin from components folder, which is not a component)
    • Correct path resolving with entryFile and outDir

@m0ksem m0ksem added the build Build process label Jul 12, 2023
@m0ksem m0ksem self-assigned this Jul 12, 2023

const exports = await fineComponents(resolve(cwd, entry))

const componentsNameRegex = new RegExp(options.componentsNamePattern || '\w*')

Check failure

Code scanning / CodeQL

Useless regular-expression character escape High

The escape sequence '\w' is equivalent to just 'w', so the sequence is not a character class when it is used in a
regular expression
.
const exports = await fineComponents(resolve(cwd, entry))

const componentsNameRegex = new RegExp(options.componentsNamePattern || '\w*')
const composablesNameRegex = new RegExp(options.composablesNamePattern || 'use\w*')

Check failure

Code scanning / CodeQL

Useless regular-expression character escape High

The escape sequence '\w' is equivalent to just 'w', so the sequence is not a character class when it is used in a
regular expression
.
@m0ksem
Copy link
Contributor Author

m0ksem commented Aug 31, 2023

I decided I don't need this ASAP, so we can put it on hold.

After 1.8.0 some of the plugins will be updated, to fix VaLayout issue. Make sure to update this PR as well.

@m0ksem m0ksem added the ON HOLD We want this, just later label Aug 31, 2023
@m0ksem m0ksem marked this pull request as draft August 31, 2023 10:19
@m0ksem
Copy link
Contributor Author

m0ksem commented Sep 8, 2023

This PR actually reduces bundle size fixing lodash issues, lol. Need to be finished.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Build process ON HOLD We want this, just later
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expose Vuestic build files as framework for building UI libs
2 participants