berak change
- change the type to module (#45)
- index.js
+ index.cjs
- index.es.js
+ index.js
fix
- optimize file writing (#42)
- incompatible with pure number types (#43)
feat
- add fastGlobConfig for fast-glob (#39)
fix
- the attribute-value should change with type (#38)
feat
- compatible with more types
- move events to js/events
- add config slotsType (#36)
feat
- support filter options from type (view instructions for use)
- export utils functions
fix
- miss type boolean
- partial separator not replaced
feat
- add config reWebTypesType
- improve types for web-types
feat
- update web-types to 2.0
- add attribute enum autosuggestion for web-types
feat
- export all function
- use matchAll replace match
- add RegExp for
titleRegExp
tableRegExp
andfileNameRegExp
- const helper = require('../lib/index')
+ const helper = require('../lib/index').default
# or
- const helper = require('../lib/index')
+ const { main } = require('../lib/index')
It is recommended to replace regular strings with RegExp
{
- titleRegExp: '#+\\s+(.*)\\n+([^(#|\\n)]*)',
+ titleRegExp: /#+\s+(.*)\n+([^(#|\n)]*)/g,
- titleRegExp: '#+\\s+(.*)\\n+>\\s*([^(#|\\n)]*)',
+ titleRegExp: /#+\s+(.*)\n+>\s*([^(#|\n)]*)/g,
- tableRegExp: '#+\\s+(.*)\\n+(\\|?.+\\|.+)\\n\\|?\\s*:?-+:?\\s*\\|.+((\\n\\|?.+\\|.+)+)',
+ tableRegExp: /#+\s+(.*)\n+(\|?.+\|.+)\n\|?\s*:?-+:?\s*\|.+((\n\|?.+\|.+)+)/g,
- tableRegExp: '#+\\s+(.*\\s*Props|.*\\s*Events|.*\\s*Slots|.*\\s*Directives)\\s*\\n+(\\|?.+\\|.+)\\n\\|?\\s*:?-+:?\\s*\\|.+((\\n\\|?.+\\|.+)+)',
+ tableRegExp: /#+\s+(.*\s*Props|.*\s*Events|.*\s*Slots|.*\s*Directives)\n+(\|?.+\|.+)\n\|?\s*:?-+:?\s*\|.+((\n\|?.+\|.+)+)/g,
- fileNameRegExp: '\\/((\\w|-)+)\\.\\w+$',
+ fileNameRegExp: /\/((\w|-)+)\.\w+$/,
}
feat
- export all types
fix
- support windows path
feat
- add
reWebTypesSource
config
fix
- the header error of description in tags
feat
- add
reVeturDescription
config - add arg for reDocUrl (path: string)
- resolve
Subtags
in header of tabel - parsing subtitles
feat
- add
space
config - remove '[]'
fix
- split error when '\w|'
- split error when '|'
feat
- add arg for reAttribute (row: string[], title: string)
fix
- not support '|' in table
- not support ||| in table