Skip to content

Commit

Permalink
Merge pull request #178 from KorzhCom/dev
Browse files Browse the repository at this point in the history
Version 4.21.0
  • Loading branch information
korzh authored Jan 5, 2024
2 parents 364cb2d + 28176f7 commit a87fd9f
Show file tree
Hide file tree
Showing 45 changed files with 480 additions and 648 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/js-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ jobs:
./easydata.js/packs/*/LICENSE.md
./easydata.js/packs/*/README.md
- name: Upload browser artifacts
- name: Upload Bundles artifacts
uses: actions/upload-artifact@v4
with:
name: browser
name: bundles
path: |
./easydata.js/packs/crud/lib/*.js
./easydata.js/packs/crud/lib/*.css
./easydata.js/bundles/**/*.js
./easydata.js/bundles/**/*.css
release_dev:
name: Development Release
Expand All @@ -85,11 +85,11 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Download browser artifacts
- name: Download Bundles artifacts
uses: actions/download-artifact@v4
with:
name: browser
path: browser
name: bundles
path: bundles

- name: Read version.json to env
uses: antifree/json-to-variables@v1.0.1
Expand All @@ -103,7 +103,7 @@ jobs:
server: ${{ secrets.CDN_FTP_SERVER }}
username: ${{ secrets.CDN_FTP_USER }}
password: ${{ secrets.CDN_FTP_PWD }}
local-dir: './browser/'
local-dir: './bundles/crud/dist/'
server-dir: 'cdn.korzh.com/ed/${{ env.ed_baseVersion }}/'

- name: Download packs artifacts
Expand Down Expand Up @@ -141,11 +141,11 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Download browser artifacts
- name: Download bundles artifacts
uses: actions/download-artifact@v4
with:
name: browser
path: browser
name: bundles
path: bundles

- name: Read version.json to env
uses: antifree/json-to-variables@v1.0.1
Expand All @@ -159,7 +159,7 @@ jobs:
server: ${{ secrets.CDN_FTP_SERVER }}
username: ${{ secrets.CDN_FTP_USER }}
password: ${{ secrets.CDN_FTP_PWD }}
local-dir: './browser/'
local-dir: './bundles/crud/dist/'
server-dir: 'cdn.korzh.com/ed/${{ env.ed_baseVersion }}/'

- name: Download packs artifacts
Expand Down
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -385,4 +385,9 @@ playground/EasyDataAspNetCoreTest01/wwwroot/js/dashboard.js.map
.idea
dist2
docs2
.nx
.nx
/playground/EasyDataAspNetCoreTest01/wwwroot/js/easydata.min.js
/playground/EasyDataAspNetCoreTest03/wwwroot/css
/playground/EasyDataAspNetCoreTest03/wwwroot/js
/playground/EasyDataAspNetCoreTest01/wwwroot/js/easydata-all.js
/playground/EasyDataAspNetCoreTest01/wwwroot/js/easydata-all.min.js
6 changes: 6 additions & 0 deletions clean.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
call npm cache clean --force
call nx reset
call npx lerna clean
rmdir /S /Q node_modules
del package-lock.json
call npm update
1 change: 1 addition & 0 deletions easydata.js/bundles/crud/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lib
37 changes: 37 additions & 0 deletions easydata.js/bundles/crud/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# @easydata/bundle (part of EasyData library)

## What is EasyData?

EasyData is an open-source library that allows you to simplify data management tasks in your web applications. Here we are talking about usual CRUD (create, retrieve, update, delete) operations first of all.

EasyData introduces a declarative approach to building a user interface for most data operations.
You simply describe your data: entities (tables), attributes (fields), relationships between them, data types, constraints, etc., and EasyData automatically, at run-time renders the necessary forms and dialogs to view, search and edit the data.

## What is @easydata/bundle package?

This package is a part EasyData.JS library.
It contains UI widgets and views for implementing UI for CRUD (create/read/update/delete) operations over your database.

## How to start?

@easydata NPM packages make up the client-side part of EasyData. It means that you need something on your server-side to utilize EasyData in your project. The possible options are:

### 1. ASP.NET Core projects

To start with ASP.NET Core backend you can simply clone [EasyData repository on GitHub](https://github.com/KorzhCom/EasyData/) and try one of the sample projects included in that repository. After that, you can follow [the instruction](https://github.com/KorzhCom/EasyData/blob/master/README.md) published there to apply EasyData to your own project.

### 2. Any other backend platform.

Sorry, but it's not possible yet :(

Please [submit an issue on GitHub](https://github.com/KorzhCom/EasyData/issues) (or vote for an existing one) to encourage us to add the support for your platform of choice faster.

## Documentation

* [GitHub repo README] (https://github.com/KorzhCom/EasyData/blob/master/README.md)
* [An overview and some basic instructions](https://korzh.com/blog/crud-asp-net-core-with-easydata)
* [Sample projects](https://github.com/KorzhCom/EasyData/tree/master/samples) (for ASP.NET Core only for now)

## License
This package (together with all other packages in @easydata) is distributed under MIT license.

34 changes: 34 additions & 0 deletions easydata.js/bundles/crud/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"name": "@easydata/bundle-crud",
"version": "1.4.21",
"description": "EasyData.JS bundle",
"scripts": {
"clear": "shx rm -rf dist/* docs/* lib/*",
"build": "npm run clear && rollup -c && copyfiles -f dist/easydata.min.js ../../../playground/EasyDataAspNetCoreTest03/wwwroot/js && copyfiles -f dist/easydata.min.css ../../../playground/EasyDataAspNetCoreTest03/wwwroot/css",
"watch": "rollup -c -w"
},
"author": "Korzh.com",
"homepage": "https://github.com/KorzhCom/EasyData",
"repository": {
"type": "git",
"url": "https://github.com/KorzhCom/EasyData.git"
},
"keywords": [
"database",
"crud",
"paging",
"data table",
"data filter"
],
"bugs": "https://github.com/KorzhCom/EasyData/issues",
"license": "MIT",
"browserslist": [
"defaults"
],
"dependencies": {
"@easydata/crud": "1.4.21"
},
"files": [
"dist"
]
}
136 changes: 136 additions & 0 deletions easydata.js/bundles/crud/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
import {nodeResolve} from '@rollup/plugin-node-resolve'
import commonjs from '@rollup/plugin-commonjs'
import terser from '@rollup/plugin-terser'
import progress from 'rollup-plugin-progress'
import typescript from '@rollup/plugin-typescript'
import typedoc from '@olton/rollup-plugin-typedoc'
import multi from '@rollup/plugin-multi-entry'
import * as path from "path";
import { fileURLToPath } from 'url';
import noEmit from 'rollup-plugin-no-emit'
import postcss from 'rollup-plugin-postcss'
import autoprefixer from "autoprefixer"
import pkg from './package.json' assert { type: 'json' };
import buble from '@rollup/plugin-buble'
import cleanup from 'rollup-plugin-cleanup'

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

const production = !(process.env.ROLLUP_WATCH),
sourcemap = !production,
cache = false

const banner = `
/*!
* EasyData.JS CRUD Bundle v${pkg.version}
* Copyright 2020-${new Date().getFullYear()} Korzh.com
* Licensed under MIT
*/
`

const onwarn = warn => {
if (/Generated an empty chunk/.test(warn) || warn.code === 'FILE_NAME_CONFLICT') return;
console.error( warn )
}


export default [
{
input: './src/index.ts',
cache,
watch: {
include: 'src/**',
clearScreen: false
},
plugins: [
progress({ clearLine: true, }),
cleanup(),
buble({
transforms: {forOf: false}
}),
nodeResolve({ browser: true, }),
],
context: "window",
output: [
{
file: './dist/easydata.js',
format: 'umd',
sourcemap,
banner,
name: "easydata",
extend: true,
},
{
file: './dist/easydata.min.js',
format: 'umd',
sourcemap,
banner,
name: "easydata",
extend: true,
plugins: [
terser({
keep_classnames: true,
keep_fnames: true,
}),
],
},
]
},
{
input: './src/css-easydata.js',
plugins: [
progress({
clearLine: true,
}),
nodeResolve(),
postcss({
extract: true,
minimize: false,
use: ['less'],
sourceMap: false,
plugins: [
autoprefixer(),
]
}),
noEmit({
match(fileName, output) {
return 'css-easydata.js' === fileName
}
}),
],
output: {
file: './dist/easydata.css',
banner,
},
onwarn,
},
{
input: './src/css-easydata.js',
plugins: [
progress({
clearLine: true,
}),
nodeResolve(),
postcss({
extract: true,
minimize: true,
use: ['less'],
sourceMap: sourcemap,
plugins: [
autoprefixer(),
]
}),
noEmit({
match(fileName, output) {
return 'css-easydata.js' === fileName
}
}),
],
output: {
file: './dist/easydata.min.css',
banner,
},
onwarn,
},
]
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '@easydata/ui/dist/assets/css/easy-grid.css'
import '@easydata/ui/dist/assets/css/easy-grid.css'
import '@easydata/ui/dist/assets/css/easy-dialog.css'
import '@easydata/ui/dist/assets/css/easy-forms.css'
import '../assets/css/ed-view.css'
import '@easydata/crud/dist/assets/css/ed-view.css'
9 changes: 9 additions & 0 deletions easydata.js/bundles/crud/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import * as core from "@easydata/core"
import * as ui from "@easydata/ui"
import * as crud from "@easydata/crud"

export {
core,
ui,
crud
}
24 changes: 24 additions & 0 deletions easydata.js/bundles/crud/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"compileOnSave": false,
"compilerOptions": {
"noImplicitAny": false,
"strictNullChecks" : false,
"strict": true,
"sourceMap": true,
"declaration": true,
"module": "es6",
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
"target": "es5",
"typeRoots": ["node_modules/@types"],
"lib": ["es5", "dom"],
"baseUrl": ".",
"outDir": "./dist/types",
"noEmitOnError": true
},
"include": [
"./src/**/*.ts"
]
}
6 changes: 0 additions & 6 deletions easydata.js/packs/core/babel.config.js

This file was deleted.

8 changes: 4 additions & 4 deletions easydata.js/packs/core/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "@easydata/core",
"version": "1.4.20",
"version": "1.4.21",
"description": "EasyData.JS core functions, classes, and data structures",
"types": "./dist/types/public_api.d.ts",
"main": "./dist/easydata.core.cjs.js",
"module": "./dist/easydata.core.es.js",
"module": "./dist/easydata.core.esm.js",
"scripts": {
"clear": "shx rm -rf dist/* docs/*",
"build": "npm run clear && rollup --config",
"watch": "npm run clear && rollup --config -w",
"build": "npm run clear && rollup -c",
"watch": "rollup -c -w",
"docs": "typedoc src/public_api.ts --out ./docs",
"test": "vitest run"
},
Expand Down
Loading

0 comments on commit a87fd9f

Please sign in to comment.