Decomponentify
A node.js browserify transform to enable the use of component.js components in browserify client javascript projects.
Install / Use
/learn @eugeneware/DecomponentifyREADME
decomponentify
A browserify transform to enable the use of component.js components in browserify client javascript projects.
Installation
Installation is via npm:
$ npm install decomponentify
How to use.
Install some components:
# creates files in component/component-moment/
$ component install component/moment
Build out your component file into a place where you can require it from browserify:
# Builds all the components into public/scripts/vendor/component/index.js
$ component build -o public/scripts/vendor/component -n index
Require the build file in your browserify code and access the component modules by their fully qualified name (eg. 'component-moment'):
// File: public/scripts/app.js
var domready = require('domready')
, component = require('./vendor/component')
, moment = component('component-moment');
domready(function () {
console.log(moment.format('dddd')); // prints "Monday"
});
Build out your browserify bundle using the decomponentify transform:
$ browserify -t decomponentify public/scripts/app.js -o public/scripts/build/bundle.js
Then include your bundle.js in your HTML file and you're done!
Related Skills
node-connect
346.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
107.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
346.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
346.8kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
