Skip to content

Commit

Permalink
rename to dom
Browse files Browse the repository at this point in the history
  • Loading branch information
olton committed Jan 14, 2025
1 parent 7bbf347 commit fa5e9e2
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 53 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
node_modules
dist
ftpauth.json
output
output/index.js
output/lib.js
21 changes: 10 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
# m4q - DOM manipulation helper and JQuery replacer
# DOM – Simple library for HTML elements manipulating and animating and JQuery replacer

The m4q is a small library for DOM manipulation.
This helper designed for [Metro UI](https://metroui.org.ua) project to replace jQuery.
m4q is not a complete jQuery equivalent, and there are differences.
Dom is a small library for work with HTML elements.
This library is designed for [Metro UI](https://metroui.org.ua) project to replace jQuery.

#### Status
![Version](https://img.shields.io/npm/v/m4q)
![Version](https://img.shields.io/github/package-json/v/olton/m4q)
[![develop Status](https://img.shields.io/badge/status-release-darklime.svg)](https://david-dm.org/olton/m4q)
[![Dependencies](https://img.shields.io/badge/Dependencies-none-darklime.svg?style=flat)](https://github.com/olton/m4q/blob/master/LICENSE)
![Minified Size](https://img.shields.io/bundlejs/size/m4q)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg?style=flat)](https://github.com/olton/m4q/blob/master/LICENSE)
![Version](https://img.shields.io/npm/v/dom)
![Version](https://img.shields.io/github/package-json/v/olton/dom)
[![develop Status](https://img.shields.io/badge/status-release-darklime.svg)](https://david-dm.org/olton/dom)
[![Dependencies](https://img.shields.io/badge/Dependencies-none-darklime.svg?style=flat)](https://github.com/olton/dom/blob/master/LICENSE)
![Minified Size](https://img.shields.io/bundlejs/size/dom)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg?style=flat)](https://github.com/olton/dom/blob/master/LICENSE)

## Documentation
Read about `m4q` usage in the [Metro 4 docs](https://metroui.org.ua/m4q-about.html)
Read about `Dom` usage in the [Metro 4 docs](https://metroui.org.ua/)


### Credits
Expand Down
33 changes: 11 additions & 22 deletions build.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import {build} from "esbuild"
import {build, context} from "esbuild"
import progress from "@olton/esbuild-plugin-progress"
import fs from "fs"
import fs from "node:fs"
import pkg from "./package.json" with {type: "json"}

const production = process.env.NODE_ENV === 'production'

const banner = `
/*!
* Query DOM (m4q, https://metroui.org.ua)
* DOM - Work with HTML elements (@olton/dom, https://metroui.org.ua)
* Version: ${pkg.version}
* Build date: ${new Date().toLocaleString()}
* Copyright 2012-${new Date().getFullYear()} by Serhii Pimenov
* Licensed under MIT
*/
Expand Down Expand Up @@ -69,39 +71,26 @@ const defaults = {
await build({
...defaults,
entryPoints: ['output/index.js'],
outfile: 'dist/m4q.esm.js',
outfile: 'dist/dom.js',
format: 'esm',
plugins: [
progress({
text: 'Building m4q.esm.js...',
succeedText: `m4q.esm.js built successfully in %s ms!`
}),
],
})

await build({
...defaults,
entryPoints: ['output/index.js'],
outfile: 'dist/m4q.cjs.js',
format: 'cjs',
plugins: [
progress({
text: 'Building m4q.cjs.js...',
succeedText: `m4q.cjs.js built successfully in %s ms!`
text: 'Building...',
succeedText: `Built successfully in %s ms!`
}),
],
})

await build({
...defaults,
entryPoints: ['output/lib.js'],
outfile: 'lib/m4q.js',
outfile: 'lib/dom.js',
format: 'iife',
minify: production,
plugins: [
progress({
text: 'Building lib m4q.js...',
succeedText: `Lib m4q.js built successfully in %s ms!`
text: 'Building lib...',
succeedText: `Lib built successfully in %s ms!`
}),
],
})
8 changes: 5 additions & 3 deletions lib/m4q.js → lib/dom.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions output/_readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Folder to generate temporary output files.
27 changes: 11 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,40 +1,35 @@
{
"name": "m4q",
"title": "m4q",
"description": "Helper for DOM manipulation, animation, and ajax routines. JQuery replacer.",
"version": "3.2.0",
"main": "dist/m4q.esm.js",
"export": {
"import": "./dist/m4q.esm.js",
"require": "./dist/m4q.cjs.js"
},
"name": "@olton/dom",
"title": "Dom",
"description": "DOM - Work with HTML elements, animation HTML elements and props, and ajax routines. JQuery replacer.",
"version": "1.0.0",
"main": "dist/dom.js",
"type": "module",
"types": "ts/m4q.d.ts",
"types": "ts/dom.d.ts",
"files": [
"dist"
],
"homepage": "https://metroui.org.ua/m4q-about.html",
"homepage": "https://metroui.org.ua/",
"author": {
"name": "Serhii Pimenov",
"url": "https://pimenov.com.ua",
"email": "[email protected]"
},
"repository": {
"type": "git",
"url": "https://github.com/olton/m4q.git"
"url": "https://github.com/olton/dom.git"
},
"keywords": [
"metro4",
"m4q",
"metroui",
"javascript",
"browser",
"library",
"dom",
"animation",
"jquery"
"replace jquery"
],
"bugs": {
"url": "https://github.com/olton/m4q/issues"
"url": "https://github.com/olton/dom/issues"
},
"license": "MIT",
"scripts": {
Expand Down

0 comments on commit fa5e9e2

Please sign in to comment.