Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Lu Nguyen committed Jun 15, 2023
2 parents b7f4094 + d4853c3 commit c36dcae
Show file tree
Hide file tree
Showing 6 changed files with 1,130 additions and 2,094 deletions.
14 changes: 14 additions & 0 deletions craco.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
const { DefinePlugin } = require('webpack');
const { GitRevisionPlugin } = require('git-revision-webpack-plugin');
const gitRevisionPlugin = new GitRevisionPlugin();

module.exports = {
eslint: {
enable: false,
},

webpack: {
plugins: {
add: [
new DefinePlugin({
VERSION: JSON.stringify(gitRevisionPlugin.version()),
}),
],
},
},
};
18 changes: 10 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aesirx-dam-app",
"version": "1.2.12",
"version": "1.3.0",
"license": "GPL-3.0-only",
"author": "AesirX",
"main": "dist/index.js",
Expand All @@ -9,10 +9,10 @@
"dependencies": {
"@fortawesome/fontawesome-svg-core": "^6.2.0",
"@fortawesome/free-regular-svg-icons": "^6.2.0",
"@fortawesome/free-solid-svg-icons": "^6.2.0",
"@fortawesome/free-solid-svg-icons": "^6.4.0",
"@fortawesome/react-fontawesome": "^0.2.0",
"aesirx-lib": "^1.9.7",
"aesirx-uikit": "^1.0.8",
"aesirx-lib": "^1.10.0",
"aesirx-uikit": "^1.1.0",
"file-saver": "^2.0.5",
"mobx": "^6.9.0",
"mobx-react": "^7.6.0",
Expand All @@ -32,8 +32,8 @@
},
"scripts": {
"start": "yarn run build && serve -s build",
"build": "react-scripts build && react-inject-env set",
"test": "react-scripts test",
"build": "craco build && react-inject-env set",
"test": "craco test",
"dev": "craco start",
"lint": "eslint --fix \"src/**/\"",
"lint:check": "eslint \"src/**/\"",
Expand Down Expand Up @@ -62,22 +62,24 @@
"@babel/plugin-proposal-class-properties": "^7.18.6",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-transform-runtime": "^7.21.0",
"@babel/preset-env": "^7.19.4",
"@babel/preset-env": "^7.22.4",
"@babel/preset-react": "^7.18.6",
"@craco/craco": "^7.1.0",
"babel-plugin-file-loader": "^2.0.0",
"babel-plugin-inline-react-svg": "^2.0.1",
"babel-plugin-module-resolver": "^5.0.0",
"babel-plugin-react-css-modules": "^5.2.6",
"craco": "^0.0.3",
"esbuild-plugin-inline-image": "^0.0.9",
"esbuild-sass-plugin": "^2.8.0",
"esbuild-scss-modules-plugin": "^1.1.1",
"eslint": "^8.17",
"git-revision-webpack-plugin": "^5.0.0",
"prettier": "^2.8.4",
"react-inject-env": "^2.1.0",
"react-scripts": "^5.0.1",
"sass": "^1.52",
"serve": "^14.2.0",
"terser": "^5.17.7",
"tsup": "^6.7.0",
"url": "^0.11.0"
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/Storage/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const Storage = () => {
const store = new DamStore();
const subscriptionFromLibrary = await store.getSubscription();
if (subscriptionFromLibrary) {
const damSubscirption = subscriptionFromLibrary.find((item) => {
const damSubscirption = subscriptionFromLibrary?.find((item) => {
if (item[DAM_SUBSCIPTION_FIELD_KEY.PRODUCT]?.type === 'product-aesirx-dam') {
return item;
}
Expand Down
10 changes: 8 additions & 2 deletions src/integration/lib/AesirXDamForm/CollectionForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,14 @@ import React, { Component } from 'react';
import SimpleReactValidator from 'simple-react-validator';
import { DAM_ASSETS_FIELD_KEY, DAM_COLLECTION_FIELD_KEY } from 'aesirx-lib';
import { withTranslation } from 'react-i18next';
import { renderingGroupFieldHandler } from 'utils/form';
import { Spinner, PAGE_STATUS, FORM_FIELD_TYPE, Button } from 'aesirx-uikit';

import {
Spinner,
PAGE_STATUS,
FORM_FIELD_TYPE,
Button,
renderingGroupFieldHandler,
} from 'aesirx-uikit';

class AesirXCollectionForm extends Component {
formPropsData = null;
Expand Down
23 changes: 14 additions & 9 deletions tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,28 @@ import inlineImage from 'esbuild-plugin-inline-image';
const env = process.env.NODE_ENV;

export const tsup: Options = {
clean: true,
clean: env !== 'development',
format: ['esm'],
minify: env === 'production',
minify: env === 'development' ? false : 'terser',
watch: env === 'development',
outDir: 'dist',
entry: ['src/integration/index.js'],
outExtension() {
return {
js: `.js`,
};
},
entry: ['src/integration/index.js', 'src/integration/**/*.{js,jsx}'], //entry: ['src/index.{ts,tsx}', 'src/**/*.{ts,tsx}', '!src/**/*.test.{ts,tsx}', '!src/**/*.d.ts'],
target: 'es2020',
platform: 'browser',
esbuildPlugins: [
inlineImage({ limit: -1 }),
ScssModulesPlugin({ localsConvention: 'dashes' }),
sassPlugin({ type: 'style' }),
],
outExtension() {
return {
js: `.js`,
};
},
terserOptions: {
compress: { drop_console: true },
},
loader: {
'.js': 'jsx',
},
target: 'es2020',
};
Loading

0 comments on commit c36dcae

Please sign in to comment.