Skip to content

Commit

Permalink
from meta to submodule + npm/yarn workspaces, add silex-doc and Silex…
Browse files Browse the repository at this point in the history
….wiki
  • Loading branch information
lexoyo committed Feb 6, 2023
1 parent b25da7c commit 8109391
Show file tree
Hide file tree
Showing 17 changed files with 46,213 additions and 106 deletions.
6 changes: 0 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,2 @@
.git
node_modules
/packages/*
/packages/editor.silex.me/
/packages/silex-desktop/
/packages/grapesjs-ui-suggest-classes/
/packages/eleventy-plugin-directus/
/packages/grapesjs-fonts/
30 changes: 30 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
[submodule "packages/editor.silex.me"]
path = packages/editor.silex.me
url = git@github.com:silexlabs/editor.silex.me.git
[submodule "packages/silex-desktop"]
path = packages/silex-desktop
url = git@github.com:silexlabs/silex-desktop.git
[submodule "packages/grapesjs-ui-suggest-classes"]
path = packages/grapesjs-ui-suggest-classes
url = git@github.com:silexlabs/grapesjs-ui-suggest-classes.git
[submodule "packages/grapesjs-symbols"]
path = packages/grapesjs-symbols
url = git@github.com:silexlabs/grapesjs-sympbols.git
[submodule "packages/eleventy-plugin-directus"]
path = packages/eleventy-plugin-directus
url = git@github.com:silexlabs/eleventy-plugin-directus.git
[submodule "packages/grapesjs-fonts"]
path = packages/grapesjs-fonts
url = git@github.com:silexlabs/grapesjs-fonts.git
[submodule "packages/Silex"]
path = packages/Silex
url = git@github.com:silexlabs/Silex.git
[submodule "packages/node_modules-path"]
path = packages/node_modules-path
url = git@github.com:lexoyo/node_modules-path.git
[submodule "packages/silex-doc"]
path = packages/silex-doc
url = git@github.com:silexlabs/silex-doc.git
[submodule "packages/Silex.wiki"]
path = packages/Silex.wiki
url = https://github.com/silexlabs/Silex.wiki.git
12 changes: 0 additions & 12 deletions .meta

This file was deleted.

2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16
18.13.0
116 changes: 43 additions & 73 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This is a [meta repository](https://github.com/mateodelnorte/meta#readme) for Silex website builder

It includes all sub projects needed for Silex development, this is the repo you need to contribute to Silex.
It includes all sub projects needed for Silex development as git submodules. This is the repo you need to contribute to Silex as many of the projects are dependencies of each other, so we can iterate in all at the same time and benefit from using [Yarn Workspaces](https://classic.yarnpkg.com/en/docs/workspaces/) or [npm workspaces](https://docs.npmjs.com/cli/using-npm/workspaces).

There is no issue on this repo, please use the individual project's issues

Expand All @@ -21,24 +21,26 @@ There is no issue on this repo, please use the individual project's issues
| Unifile and unifile-* | `/packages/unifile*` | [Website](http://projects.silexlabs.org/unifile/) | Nodejs library to access cloud storage services with a common API. | [Github repo](https://github.com/silexlabs/unifile) | [npm package](https://www.npmjs.com/package/unifile) | [docs](http://projects.silexlabs.org/unifile/) | MIT |
| eleventy-plugin-directus | `/packages/eleventy-plugin-directus` | - | Expose Directus collections as global data in 11ty | https://github.com/silexlabs/eleventy-plugin-directus | [npm package]() | https://github.com/silexlabs/eleventy-plugin-directus | MIT |

## Instructions
## Instruction

To contribute to Silex you need to clone this repo.
To contribute to Silex you need to clone this repo with its submodules, make sure you use the required nodejs version (nvm) and install its dependencies (yarn or npm):

1. As this is a meta repo, you will need to [install meta](https://github.com/mateodelnorte/meta#getting-started)
1. Clone this repo with `meta git clone git@github.com:silexlabs/silex-meta.git` or `meta git clone https://github.com/silexlabs/silex-meta.git`
1. Cd in the repo: `cd silex-meta`
1. Use the recommended version of node: `nvm use`
1. Install all dependencies: `npm install && meta exec "npm install"`
1. ~Make each project uses the development version of any other project in the meta repo: `meta npm link && meta npm link --all`~
1. Make each project uses the development version of any other project in the meta repo: `meta exec "npm link" && node scripts/link-all.js` (all your repo need to be installed with the same npm version for this to work)
```
$ git clone git@github.com:silexlabs/silex-meta.git --recurse-submodules -j8
$ cd silex-meta
$ nvm use
$ npm install OR yarn install
$ npm start OR yarn start
```

Useful commands

* Start Silex: `cd packages/silex-website-builder/ && npm start` (or use `npm run start:debug`)
* Release and bump version of a library and all its dependents: `meta release-version unifile`, see [Meta release plugin](https://github.com/alqh/meta-release)
* Detect which package needs a release: `node scripts/detect-changes.js`
* Add a project: meta project import $FOLDER $GIT_URL
* Start Silex: `npm start` (or use `npm run start:debug`)
* Release a package (which is in $FOLDER) and bump version of a library and all its dependents: `scripts/release-version $FOLDER $VERSION`, then you probably want to `git push --follow-tags` the changed packages
* Add a project:

1. `git submodules add $GIT_URL $FOLDER`
2. add $FOLDER to the `packages` array of `package.json`


## Third party dependencies
Expand All @@ -52,65 +54,6 @@ Useful commands

This includes all the packages of this repo.

As of june 2017, around 100.000 lines of code. See [github API count (includes blank lines and comments I guess)](https://api.github.com/repos/silexlabs/Silex/languages):

```
JavaScript: 856643,
CSS: 82702,
HTML: 53727,
Shell: 1532
```

[cb372's report](http://line-count.herokuapp.com/silexlabs/Silex):

<table id="results" class="table table-striped">
<tbody>
<tr>
<th>File Type</th>
<th>Files</th>
<th>Lines of Code</th>
<th>Total lines</th>
</tr>
<tr>
<td>JavaScript</td>
<td>422</td>
<td>138797</td>
<td>183644</td>
</tr>
<tr>
<td>Json</td>
<td>3</td>
<td>146</td>
<td>146</td>
</tr>
<tr>
<td>Text</td>
<td>12</td>
<td>0</td>
<td>1047</td>
</tr>
<tr>
<td>Shell</td>
<td>4</td>
<td>24</td>
<td>47</td>
</tr>
<tr>
<td>Stylesheets</td>
<td>90</td>
<td>17777</td>
<td>21504</td>
</tr>
<tr>
<td>Html</td>
<td>7</td>
<td>545</td>
<td>726</td>
</tr>
</tbody>
</table>


[Cloc's report](https://github.com/AlDanial/cloc) in mar. 2021:

```
Expand All @@ -137,4 +80,31 @@ SUM: 804 33177 17745 181865
-------------------------------------------------------------------------------
```

[Cloc's report](https://github.com/AlDanial/cloc) in feb 2023:

```
$ cloc packages
515 text files.
345 unique files.
697 files ignored.
github.com/AlDanial/cloc v 1.92 T=1.00 s (345.0 files/s, 212776.0 lines/s)
-------------------------------------------------------------------------------
Language files blank comment code
-------------------------------------------------------------------------------
JSON 22 1 0 119875
JavaScript 62 7190 7805 38240
TypeScript 142 2035 4067 17106
CSS 21 594 715 5761
YAML 23 53 39 2914
LESS 21 138 159 2234
Markdown 15 413 0 932
Pug 14 49 30 899
EJS 7 35 4 798
HTML 3 56 12 495
SVG 13 0 0 96
Dockerfile 2 9 9 13
-------------------------------------------------------------------------------
SUM: 345 10573 12840 189363
-------------------------------------------------------------------------------
```
Loading

0 comments on commit 8109391

Please sign in to comment.