Skip to content

Commit

Permalink
refactor(build): rename vanilla example web demo folder
Browse files Browse the repository at this point in the history
  • Loading branch information
ghiscoding-SE committed Mar 30, 2020
1 parent 31de551 commit 29c9d89
Show file tree
Hide file tree
Showing 31 changed files with 19 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"sourceMapPathOverrides": {
"webpack:///../common/*": "${webRoot}/packages/common/*",
"webpack:///../vanilla-bundle/*": "${webRoot}/packages/vanilla-bundle/*",
"webpack:///./src/*": "${webRoot}/packages/vanilla-bundle-examples/src/*"
"webpack:///./src/*": "${webRoot}/packages/web-demo-vanilla-bundle/src/*"
}
},
{
Expand All @@ -38,4 +38,4 @@
}
}
]
}
}
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@
[![codecov](https://codecov.io/gh/ghiscoding/slickgrid-universal/branch/master/graph/badge.svg)](https://codecov.io/gh/ghiscoding/slickgrid-universal)
[![jest](https://jestjs.io/img/jest-badge.svg)](https://github.com/facebook/jest)

This is a monorepo project (using Lerna) which is regrouping a few packages under a single repository. The goal is to create a common repo that includes all Editors, Filters, Extensions and Services that could be used by any Framework (it is framework agnostic). It's also a good opportunity to decouple some other features/services that not every user require, this will also help in getting a smaller bundle size. For example, not many users require backend services (OData, GraphQL), which is why they are better handled in a monorepo structure.
This is a monorepo project (using Lerna) which is regrouping a few packages under a single repository. The goal is to create a common repo that includes all Editors, Filters, Extensions and Services that could be used by any Framework (it is framework agnostic). It's also a good opportunity to decouple some features/services that not every project require at all time, this will also help in getting a smaller bundle size. For example, not every project require backend services (OData, GraphQL), which is why they are better handled in a monorepo structure.

### Demo page
The GitHub [demo page](https://ghiscoding.github.io/slickgrid-universal) uses the Material Design theme but you could also use `Bootstrap 3` and/or `Bootstrap 4` theme which is demoed in other frameworks.
- [Web-Demo-Vanilla-Bundle](https://ghiscoding.github.io/slickgrid-universal) with Material Design theme

### Why create this monorepo?
You might be wondering why was this monorepo created?
Expand All @@ -18,30 +22,35 @@ You might be wondering why was this monorepo created?
### Framework using this monorepo
This is a Work in Progress, eventually [Angular-Slickgrid](https://github.com/ghiscoding/Angular-Slickgrid) and [Aurelia-Slickgrid](https://github.com/ghiscoding/aurelia-slickgrid) will be rewritten to use this monorepo which will simplify debugging/fixing common code.

However note, that this project also has a Vanilla Implementation (not associated to any framework) and that is what the UI will be tested with. The Vanilla bundle is also used in our SalesForce (with Lighning Web Component) hence the creation of this monorepo.
Note however that this project also has a Vanilla Implementation (not associated to any framework) and that what is used to the test the UI portion. The Vanilla bundle is also used in our SalesForce (with Lighning Web Component) hence the creation of this monorepo.

The main packages structure is the following
- `@slickgrid-universal/common`: commonly used Formatters/Editors/Filters/Services/...
- this can then be used by any Framework (Angular, Aurelia, Vanilla, ...)
- `@slickgrid-universal/vanilla-bundle`: a vanilla TypeScript/JavaScript implementation (no framework)
- `slickgrid-universal/vanilla-bundle-examples` standalone package for demo purposes and UI testing (not a public package)
-
- Standalone Packages
- `slickgrid-universal/web-demo-vanilla-bundle` standalone package for demo purposes and UI testing (not a public package)

### Installation
To get going with this monorepo, you will need to clone the repo and then follow the steps below

1. Lerna Bootstrap

Run it **only once**, this will install all dependencies and add necessary monorepo symlinks
```bash
npm run bootstrap
```

2. Build
To get started you must also run (also once) an initial build so that all necessary `dist` are created for all the packages to work together.

To get started you must run (also once) an initial build so that all necessary `dist` are created for all the packages to work together.
```bash
npm run build
```

3. Run Dev (Vanilla Implementation)

There is a Vanilla flavor implementation of this monorepo, vanilla means that it is not associated to any framework and so it is plain TypeScript without being bound to any framework. The implementation is very similar to Angular and Aurelia, it could be used as a guideline to implement it in other frameworks.

```bash
Expand Down
2 changes: 1 addition & 1 deletion packages/vanilla-bundle/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
Vanilla Bundle implementation (no framework, plain TypeSript). This does what other framework would do, it makes all the features usable in 1 bundle to be used by other Apps/Projects, for example we use this bundle in our SalesForce (with Lighning Web Component) App and it requires plain ES6 JavaScript which this bundle also produce (for that there's a `dist-grid-bundle-zip` folder which zip the ES6 `dist` folder which we import in SalesForce).

### Installation
This Vanilla Bundle is used by the standalone `vanilla-bundle-examples`.
This Vanilla Bundle is used by the standalone `web-demo-vanilla-bundle`.
Go to the root of the repo and follow the instruction provided in the main [README](https://github.com/ghiscoding/slickgrid-universal#installation)
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "vanilla-bundle-examples",
"name": "web-demo-vanilla-bundle",
"version": "0.0.2",
"description": "SlickGrid-Universal demo",
"directories": {
Expand Down Expand Up @@ -53,4 +53,4 @@
"webpack-cli": "^3.3.11",
"webpack-dev-server": "^3.10.3"
}
}
}
File renamed without changes.
2 changes: 1 addition & 1 deletion test/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = {
'packages/**/*.ts',
'!**/dist/**',
'!src/assets/**',
'!packages/vanilla-bundle-examples/**',
'!packages/web-demo-vanilla-bundle/**',
'!**/node_modules/**',
'!**/test/**',
],
Expand Down

0 comments on commit 29c9d89

Please sign in to comment.