You're more than welcome to contribute to this project. Please note: your code may be used as part of a commercial product if merged.
Please don't edit files in the dist
subdirectory as they are generated via npm
script. You'll find source code in the src
subdirectory!
Regarding code style like indentation and whitespace, follow the conventions you see used in the source already.
lightGallery built on top of typescript-library-starter by Alex Jover with several modification.
- TypeScript
- SCSS
- Hugo - For documentation website
- Type Doc - For building documentation
- Rollup - For bundling
- Jest - For testing
- Prettier and eslint for code formatting and consistency
lightGallery react component is created with
create-react-app navigate to
lightgallery-react
folder and follow create react app documentation to start
building
lightGallery Vue.js component is created with Vue CLI
navigate to lightgallery-vue
folder and follow Vue CLI documentation to start
building
lightGallery Angular component is created with
angular cli navigate to lightgallery-angular
folder
and follow Angular CLI documentation to start building.
lightgallery angular follows angular workspace folder structure.
inside lightgallery-angular > projects
you'll find two folders. angular-demo
and lightgallery-angular
. lightgallery-angular
is for the library and
angular-demo
is for viewing the preview.
-
cd lightgallery-angular (navigate to lightgallery-angular folder)
-
npm install @angular/[email protected]
-
ng new 17 --create-application false
-
cd 17
-
ng generate application angular-demo
-
ng generate library lightgallery-angular (Uses folder name as package name)
-
open package.json and add
"build:library": "ng build lightgallery-angular"
-
Go to lightGallery dist folder and run npm link
-
Go to lightgallery-angular/17 folder and run npm link lightgallery
-
Change package name to lightgallery/angular/17
-
Need to compile library before using it
-
Replace both lib and app folder from previous version
Docs
First, ensure that you have the latest Node.js and npm installed.
- Fork and clone the repo.
- Run
npm install
to get the project's dependencies - Run
npm npm start
to start build in watch mode By default only lightGallery core module is compiled and watched If you want to compile any plugins along with the core module, you can runLG_PLUGINS=['thumbnails','pager']
Alternatively, you can runLG_PLUGINS='all' npm start
to compile all plugin simultaneously // To tun all plugin - LG_PLUGINS='all' npm start - Navigate to
site/
folder and run npm run start to see previewcd site && npm run start
Pull requests are very welcome. Note that if you are going to propose drastic changes, be sure to open an issue for discussion first, to make sure that your PR will be accepted before you spend effort coding it.
- Create a new branch, please don't work in your
master
branch directly. - Add failing tests for the change you want to make. Run
npm run build
to see the tests fail. - Fix stuff.
- Run
npm run build
to see if the tests pass. Repeat steps 2-4 until done. - Update the documentation to reflect any changes.
- Push to your fork and submit a pull request.