diff --git a/LISEZMOI.md b/LISEZMOI.md new file mode 100644 index 0000000..64eed86 --- /dev/null +++ b/LISEZMOI.md @@ -0,0 +1,26 @@ +SeaCMS Default Theme +================== + + - [English](README.md) + +Ce paquet est le thème principal de SeaCMS. + +**Attention : le nom SeaCMS va changer car il semble déjà utilisé dans d'autres pays** + +## Auteurs + + - Jérémy Dufraisse (2022-2023) + - Thatoo (2022-2023) + - Marion Bouder (2022-2023) + - Association Defis (2022-2023) + +## Documentation + +Quelques brides de documentation sont disponibles dans le fichier [doc/en/dev.md](doc/en/dev.md) + +## Licence et garanties + +Voir le fichier [LICENCE](./LICENCE) (et sa traduction française [LICENCE_FR](./LICENCE_FR)) + +**IMPORTANT**: Le fichier LICENCE file ne couvre pas le contenu des dossiers `vendor`. Voir le fichier LICENCE fournis dans chaque sous-dossier concerné par la bibliothèque importée. + diff --git a/README.md b/README.md index ccd8727..a9186f0 100644 --- a/README.md +++ b/README.md @@ -1,42 +1,24 @@ SeaCMS Default Theme ================== - - [Français](#Fran%C3%A7ais) - - [English](#English) - -## Français - -Ce paquet est le thème principal de SeaCMS. - -**Attention : le nom SeaCMS va changer car il semble déjà utilisé dans d'autres pays** - -### Auteurs - - - Jérémy Dufraisse (2022-2023) - - Thatoo (2022-2023) - - Marion Bouder (2022-2023) - - Association Defis (2022-2023) - -### Licence et garanties - -Voir le fichier [LICENCE](./LICENCE) (et sa traduction française [LICENCE_FR](./LICENCE_FR)) - -**IMPORTANT**: Le fichier LICENCE file ne couvre pas le contenu des dossiers `vendor`. Voir le fichier LICENCE fournis dans chaque sous-dossier concerné par la bibliothèque importée. - -## English + - [Français](LISEZMOI.md) This package is the main theme of SeaCMS. **Warning : the name SeaCMS will change because it seems already uses in other countries** -### Authors +## Authors - Jérémy Dufraisse (2022-2023) - Thatoo (2022-2023) - Marion Bouder (2022-2023) - Association Defis (2022-2023) -### Licence and warranty +## Documentation + +Some documentation is available into [doc/en/dev.md](doc/en/dev.md) + +## Licence and warranty See [LICENCE](./LICENCE) file (and french translation [LICENCE_FR](./LICENCE_FR)) diff --git a/doc/en/dev.md b/doc/en/dev.md new file mode 100644 index 0000000..a5e5b1d --- /dev/null +++ b/doc/en/dev.md @@ -0,0 +1,25 @@ +# Documentation on development + +## Using `yarn` + +[`yarn`](https://yarnpkg.com) is a package manager running on [`nodejs`](https://nodejs.org). It is veru useful to manage `javascript` or `css` projects. + +### Adding a new package + +1. find the name of the wanted package on the website +2. on command line interface, on the root folder of this project, type `yarn add --dev name-of-the-package` +3. Identify the needed files into folder `node_modules/name-of-the-package` ; most of time, files are into folder `node_modules/name-of-the-package/dist` +4. modifify the file `js/extract-files-from-node-modules` to a new line for each file to import in the theme : + - `copySync('node_modules/name-of-the-package/dist/js/file.min.js','js/vendor/name-of-the-package/file.min.js',{ overwrite: true })` for `javascript` file + - `copySync('node_modules/name-of-the-package/dist/css/file.min.css','css/vendor/name-of-the-package/file.min.css',{ overwrite: true })` for `css` file + - do not forget `LICENCE` file of the package, `copySync('node_modules/name-of-the-package/dist/LICENCE','css/vendor/name-of-the-package/LICENCE',{ overwrite: true })` for `css` (and for `javascript`) +5. type `yarn install` in commpand line interface to start this script +6. add a new line in concerned `twig` file (example : `includes/_head.twig`) to use the new file (example : ``) + +### Removing a new package + +1. find the name of the wanted package into file `package.json` +2. on command line interface, on the root folder of this project, type `yarn remove name-of-the-package` +3. Identify the associated files into folders `js/vendor` and `css/vendor` and delete them +4. modifify the file `js/extract-files-from-node-modules` to remove lines related to this package +5. remove line in concerned `twig` file (example : `includes/_head.twig`) that uses the new file (example : ``) \ No newline at end of file