Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introducing Vite 🚀 #1650

Closed
wants to merge 29 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
5651251
Added vite, loaders for svg, yaml and bpmnlint
josechirivella Mar 27, 2023
3243425
Merge remote-tracking branch 'origin/develop' into vite
josechirivella Apr 20, 2023
9c93d88
Restore babel config to the way it was
josechirivella Apr 21, 2023
9e8b866
SVG fixes and FontAwesome fix
josechirivella Apr 27, 2023
95b57ac
FOUR-6840 Eslint linting fixes
josechirivella May 1, 2023
2b87cec
Merge branch 'develop' into vite
josechirivella Aug 11, 2023
186d087
Updated the branch with develop
josechirivella Aug 11, 2023
cc16a96
Added the VFE css back
josechirivella Aug 15, 2023
4deeba3
Added resolver mapper for jest svg loader
josechirivella Aug 15, 2023
86b77d9
Removed unused import
josechirivella Aug 15, 2023
b68b0c5
Added sourcemaps and externals
josechirivella Aug 15, 2023
6d67066
Targeting the STM branch for github workflow
josechirivella Aug 15, 2023
b413215
Cleaning
josechirivella Aug 16, 2023
b38a6ba
Reverting back to exporting the install
josechirivella Aug 18, 2023
76a037e
Removing the processmaker external dep and using a better way to expo…
josechirivella Aug 18, 2023
b5b5647
Removed the externals of processmaker and testing out the default or …
josechirivella Aug 18, 2023
a51650b
Added index.js to multiple folders and renamed eslint to .cjs
josechirivella Aug 24, 2023
bebed3f
Renamed vue config file to cjs
josechirivella Aug 24, 2023
b38cdf6
Fixing linting issues
josechirivella Aug 24, 2023
dcfbb7f
Renamed jest config to cjs
josechirivella Aug 24, 2023
a360dae
Added cssInjectedByJsPlugin dep and changed the target to build the n…
josechirivella Aug 31, 2023
8bb5e09
Renamed the .cjs files to .js back
josechirivella Aug 31, 2023
582a67c
Merge branch 'next' into vite
josechirivella Sep 13, 2023
815f137
Fixing some issues for the compiler and using vue 2.7.14
josechirivella Sep 26, 2023
503fc2e
Fixing the import/exports in the package.json
josechirivella Sep 29, 2023
f112805
Merge remote-tracking branch 'origin/vite' into vite
josechirivella Oct 7, 2023
168583f
Merge branch 'next' into vite
josechirivella Dec 5, 2023
1326e56
regenerated the package-lock.json
josechirivella Dec 5, 2023
9649777
Removing commented code and unused const
josechirivella Dec 5, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/deploy-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Build Package Modeler
on:
pull_request:
types: [opened, reopened, synchronize, edited, closed]
workflow_dispatch:
workflow_dispatch:
jobs:
run_deploy:
name: Run Build PM4-workflow
uses: processmaker/processmaker/.github/workflows/deploy-pm4.yml@develop
uses: processmaker/processmaker/.github/workflows/deploy-pm4.yml@vite-js-repos
secrets: inherit
36 changes: 19 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,21 @@

`@processmaker/modeler` is a Vue.js based BPMN modeler scaffolded using [Vue CLI 3](https://cli.vuejs.org/).

- [Project setup](#project-setup)
- [Testing](#testing)
- [Architecture](#architecture)
- [Global event bus](#global-event-bus)
- [`modeler-init`](#modeler-init)
- [`modeler-start`](#modeler-start)
- [`modeler-validate`](#modeler-validate)
- [`modeler-change`](#modeler-change)
- [Undo/redo store](#undoredo-store)
- [Validation](#validation)
- [Adding a new lint rule](#adding-a-new-lint-rule)
- [Adding validation rules during runtime](#adding-validation-rules-during-runtime)
- [Examples](#examples)
- [Adding a new component](#adding-a-new-component)
- [ProcessMaker BPMN modeler](#processmaker-bpmn-modeler)
- [Project setup](#project-setup)
- [Testing](#testing)
- [Architecture](#architecture)
- [Global event bus](#global-event-bus)
- [`modeler-init`](#modeler-init)
- [`modeler-start`](#modeler-start)
- [`modeler-validate`](#modeler-validate)
- [`modeler-change`](#modeler-change)
- [Undo/redo store](#undoredo-store)
- [Validation](#validation)
- [Adding a new lint rule](#adding-a-new-lint-rule)
- [Adding validation rules during runtime](#adding-validation-rules-during-runtime)
- [Examples](#examples)
- [Adding a new component](#adding-a-new-component)

## Project setup

Expand Down Expand Up @@ -50,7 +51,7 @@ docker compose up

## Testing

Unit tests are set up using jest and end-to-end tests are set up using Cypress. Unit and end-to-end tests can be run separately or together. Code coverage is collected for both types of tests and combined into a single coverage report for the entire project.
Unit tests are set up using jest and end-to-end tests are set up using Cypress. Unit and end-to-end tests can be run separately or together. Code coverage is collected for both types of tests and combined into a single coverage report for the entire project.

Tests can be run locally with the following commands:

Expand Down Expand Up @@ -208,6 +209,7 @@ First, create your component config, and save it in a `.js` file:

```javascript
// CustomComponentConfig.js
import icon from '@/assets/toolpanel/scriptTask.svg';

export default {
// A unique ID that will be used to identify your component
Expand All @@ -227,7 +229,7 @@ export default {
category: 'BPMN',

// The icon representing the component in the controls panel
icon: require('@/assets/toolpanel/scriptTask.svg'),
icon,

// The label for the component in the controls panel
label: 'Script Task',
Expand Down Expand Up @@ -257,7 +259,7 @@ export default {
{
name: 'CustomComponent',
items: [
// Each item corresponds to a form element.
// Each item corresponds to a form element.
{
// Component can be a custom Vue component or a reference to a form component from @processmaker/vue-form-elements
component: 'FormText',
Expand Down
18 changes: 18 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="/public/favicon.ico">
<title>modeler</title>
</head>
<body>
<noscript>
<strong>We're sorry but modeler doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="modeler-app"></div>
<!-- built files will be auto injected -->
<script src="/src/main.js" type="module"></script>
</body>
</html>
4 changes: 2 additions & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ module.exports = {
'^.+\\.vue$': 'vue-jest',
'.+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$': 'jest-transform-stub',
'^.+\\.jsx?$': 'babel-jest',
'\\.svg$': '<rootDir>/fileTransformer.js',
'\\.yml$': '<rootDir>/fileTransformer.js',
},

Expand All @@ -19,6 +18,7 @@ module.exports = {
],

moduleNameMapper: {
'.+\\.(svg)(\\?url)?$': '<rootDir>/tests/unit/svgMock.vue',
'^@/(.*)$': '<rootDir>/src/$1',
'^js-yaml-loader\\!@fortawesome/(.*)\\.yml$': '<rootDir>/node_modules/@fortawesome/$1.yml',
},
Expand All @@ -39,5 +39,5 @@ module.exports = {
collectCoverage: true,
coverageDirectory: 'jest-coverage',
testEnvironment: 'jsdom',
preset: '@vue/cli-plugin-unit-jest',
// preset: '@vue/cli-plugin-unit-jest',
};
Loading
Loading