Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
darkmode
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
darkmode
Commits
84aa6785
Commit
84aa6785
authored
1 year ago
by
Bohdan Melnychuk
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3391074
: Allow to install library using composer
parent
283a684e
No related branches found
No related tags found
1 merge request
!5
Issue #3391074: Allow to install library using composer
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+53
-0
53 additions, 0 deletions
README.md
darkmode.libraries.yml
+1
-1
1 addition, 1 deletion
darkmode.libraries.yml
with
54 additions
and
1 deletion
README.md
+
53
−
0
View file @
84aa6785
Darkmode
Module and dependencies installation:
-------------------------------------
1) Run
`composer require oomphinc/composer-installers-extender`
, to install
an additional package allowing you to install Darkmode.JS as npm-asset from
asset-packagist.org.
2) Set the new repository for the composer to download npm-asset packages:
```
yaml
{
"
repositories"
:
[
{
"
type"
:
"
composer"
,
"
url"
:
"
https://packages.drupal.org/8"
},
{
"
type"
:
"
composer"
,
"
url"
:
"
https://asset-packagist.org"
}
],
}
```
3) Update the extra settings to define new installers types and configure them:
```
yaml
{
"
extra"
:
{
"
installer-types"
:
[
"
bower-asset"
,
"
npm-asset"
],
"
drupal-scaffold"
:
{
...
},
"
installer-paths"
:
{
"
web/core"
:
[
"
type:drupal-core"
],
"
web/libraries/{$name}"
:
[
"
type:drupal-library"
,
"
type:bower-asset"
,
"
type:npm-asset"
],
...
},
},
}
```
4) Run
`composer require drupal/darkmode npm-asset/darkmode-js:1.5.7`
,
to install module and it's dependencies.
----
This diff is collapsed.
Click to expand it.
darkmode.libraries.yml
+
1
−
1
View file @
84aa6785
darkmodejs
:
js
:
https://cdn.jsdelivr.net/npm
/darkmode-js
@1.5.7
/lib/darkmode-js.min.js
:
{
type
:
external
,
minified
:
true
}
/libraries
/darkmode-js/lib/darkmode-js.min.js
:
{
type
:
external
,
minified
:
true
}
initiator
:
js
:
js/init.js
:
{}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment