Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
d43e9c6
First draft: Unified dependency logic
RunDevelopment Jul 24, 2019
b57c3d1
Fix and test in index.html
RunDevelopment Jul 24, 2019
c2c1a33
Added tests
RunDevelopment Jul 24, 2019
e065553
Added native support for aliases
RunDevelopment Jul 30, 2019
f8803c9
Fixed types' scope
RunDevelopment Jul 30, 2019
bf81cfe
Resolved conflict
RunDevelopment Sep 3, 2019
382948b
More Doc + changed API
RunDevelopment Sep 3, 2019
c464239
Removed from index.html
RunDevelopment Sep 3, 2019
76e88a3
Fixed unknown ids and renames test file
RunDevelopment Sep 5, 2019
14d790a
Minor change
RunDevelopment Sep 5, 2019
479b372
More efficient implementation
RunDevelopment Sep 5, 2019
29fc8f9
Fixed npm test
RunDevelopment Sep 5, 2019
382ff4b
Merge branch 'master' into deps-update
RunDevelopment Sep 5, 2019
736103a
Added a check for circular dependencies
RunDevelopment Sep 5, 2019
3755eb6
Download page uses new dependency logic
RunDevelopment Sep 5, 2019
c0759f0
loadLanguages uses the new dependency logic
RunDevelopment Sep 5, 2019
839591c
Updated components.json
RunDevelopment Sep 5, 2019
1850b36
Resolved conflict
RunDevelopment Sep 5, 2019
bb12309
Added alias check
RunDevelopment Sep 6, 2019
6d59466
Extended deps test
RunDevelopment Sep 6, 2019
8fcf8b1
Test suite uses the new dependency logic
RunDevelopment Sep 6, 2019
946281f
Readded loadLanguages' load all languages behavior
RunDevelopment Sep 6, 2019
15ba68a
Added check for unknown dependency ids
RunDevelopment Sep 6, 2019
746a4dc
loadLanguages: Removed check for valid ids
RunDevelopment Sep 6, 2019
049f8c4
Removed type hack
RunDevelopment Oct 22, 2019
81e4b0d
Fixed async loading and added chainer
RunDevelopment Oct 22, 2019
148823d
Resolved conflict
RunDevelopment Oct 22, 2019
4ce06aa
String quote style
RunDevelopment Oct 22, 2019
6098aea
Merge branch 'master' into deps-update
RunDevelopment Dec 15, 2019
5275691
after → optional and some other renaming
RunDevelopment Dec 15, 2019
39ff76e
Fixed download page
RunDevelopment Dec 15, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed types' scope
  • Loading branch information
RunDevelopment committed Jul 30, 2019
commit f8803c91d20d604cd466bca7c174420dc4b09993
35 changes: 17 additions & 18 deletions dependencies.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
"use strict";

var getLoad = (function () {

/**
* @typedef {Object<string, ComponentCategory>} Components
* @typedef {{ meta: Object<string, any> } & Object<string, ComponentEntry>} ComponentCategory
*
* @typedef ComponentEntry
* @property {string} [title] The title of the component.
* @property {string} [owner] The GitHub user name of the owner.
* @property {boolean} [noCSS=false] Whether the component doesn't have style sheets which should also be loaded.
* @property {string | string[]} [alias] An optional list of aliases for the id of the component.
* @property {Object<string, string>} [aliasTitles] An optional map from an alias to its title.
*
* Aliases which are not in this map will the get title of the component.
* @property {string | string[]} [require]
* @property {string | string[]} [modify]
* @property {string | string[]} [after]
*/
/**
* @typedef {Object<string, ComponentCategory>} Components
* @typedef {{ meta: Object<string, any> } & Object<string, ComponentEntry>} ComponentCategory
*
* @typedef ComponentEntry
* @property {string} [title] The title of the component.
* @property {string} [owner] The GitHub user name of the owner.
* @property {boolean} [noCSS=false] Whether the component doesn't have style sheets which should also be loaded.
* @property {string | string[]} [alias] An optional list of aliases for the id of the component.
* @property {Object<string, string>} [aliasTitles] An optional map from an alias to its title.
*
* Aliases which are not in this map will the get title of the component.
* @property {string | string[]} [require]
* @property {string | string[]} [modify]
* @property {string | string[]} [after]
*/

var getLoad = (function () {

/**
* A function which does absolutely nothing.
Expand Down
1 change: 1 addition & 0 deletions tests/dependency-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const getLoad = require('../dependencies');

describe('Dependency logic', function () {

/** @type {import("../dependencies").Components} */
const components = {
languages: {
meta: {},
Expand Down