Skip to content

Commit

Permalink
Add type introspection API via new xtypejs introspection extension (#20)
Browse files Browse the repository at this point in the history
* Extends and replaces the typename utils extension with new introspection extension without breaking backward compatibility
* Further reduces the minified size of the xtypejs core library
  • Loading branch information
lucono authored Jan 26, 2019
1 parent 94a7af2 commit f426252
Show file tree
Hide file tree
Showing 59 changed files with 1,180 additions and 909 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@
/.settings/
/.vscode/
/wip/
**/tmp/
**/node_modules/
**/package-lock.json
18 changes: 13 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
language: node_js
node_js:
- "0.10"
- "0.12"
- "6.9.2"
before_script:
- "6"
- "9"
- "10"
- "11"
addons:
chrome: stable
firefox: latest
before_install:
- export CHROME_BIN=chromium-browser
- npm install -g grunt-cli
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
env:
# ---------
# PROJECTS
# ---------
# xtypejs
- PROJECT_DIR=project/xtypejs
# xtypejs extensions
- PROJECT_DIR=project/extensions/xtypejs-extension-custom-types
- PROJECT_DIR=project/extensions/xtypejs-extension-typename-utils
- PROJECT_DIR=project/extensions/xtypejs-extension-introspection
- PROJECT_DIR=project/extensions/xtypejs-extension-autocamel-name-scheme
# xtypejs name schemes
- PROJECT_DIR=project/name-schemes/xtypejs-name-scheme-compact
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** @license | xtypejs-extension-autocamel-name-scheme v0.1.0 | (c) 2015, Lucas Ononiwu | MIT license, xtype.js.org/license.txt
/** @license | xtypejs-extension-autocamel-name-scheme v0.1.1 | (c) 2015, Lucas Ononiwu | MIT license, xtype.js.org/license.txt
*/

/**
Expand Down Expand Up @@ -28,7 +28,7 @@
'use strict';

var LIB_NAME = 'xtypejsAutoCamelNameSchemeExtension',
LIB_VERSION = '0.1.0',
LIB_VERSION = '0.1.1',

schemeName = 'auto-camel';

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "xtypejs-extension-autocamel-name-scheme",
"version": "0.1.0",
"version": "0.1.1",
"description": "xtypejs Extension - Auto Camel Name Scheme",
"main": "dist/xtypejs-extension-autocamel-name-scheme",
"keywords": [
Expand All @@ -22,26 +22,27 @@
},
"dependencies": {},
"devDependencies": {
"grunt": "^0.4.5",
"grunt": "^1.0.3",
"grunt-cli": "^1.2.0",
"grunt-contrib-clean": "^0.6.0",
"grunt-contrib-copy": "^0.8.0",
"grunt-contrib-jshint": "^0.11.1",
"grunt-contrib-uglify": "^0.8.0",
"grunt-karma": "^0.10.1",
"grunt-shell": "^1.1.2",
"grunt-contrib-clean": "^2.0.0",
"grunt-contrib-copy": "^1.0.0",
"grunt-contrib-jshint": "^2.0.0",
"grunt-contrib-uglify": "^4.0.0",
"grunt-karma": "^3.0.1",
"grunt-shell": "^3.0.1",
"grunt-string-replace": "^1.2.0",
"jasmine": "^2.2.1",
"jasmine-core": "^2.2.0",
"jasmine": "^3.3.1",
"jasmine-core": "^3.3.0",
"jshint": "^2.6.3",
"jshint-html-reporter": "^0.2.3",
"karma": "^0.12.31",
"karma-chrome-launcher": "^0.1.7",
"karma-firefox-launcher": "^0.1.4",
"karma-coverage": "^0.2.7",
"jshint-html-reporter": "^0.2.5",
"karma": "^3.1.4",
"karma-chrome-launcher": "^2.2.0",
"karma-firefox-launcher": "^1.1.0",
"karma-coverage": "^1.1.2",
"karma-html-reporter": "^0.2.6",
"karma-jasmine": "^0.3.5",
"karma-spec-reporter": "0.0.16"
"karma-jasmine": "^2.0.1",
"karma-spec-reporter": "0.0.32",
"puppeteer": "^1.11.0"
},
"scripts": {
"test": "grunt build test"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,13 @@
process.env.CHROME_BIN = require('puppeteer').executablePath();

module.exports = function(config) {
var cfg = {
basePath: '../',
frameworks: ['jasmine'],
browsers: ['Chrome', 'Firefox'],
customLaunchers: {
Chrome_travis_ci: {
base: 'Chrome',
flags: ['--no-sandbox']
}
},
browsers: ['ChromeHeadless', 'FirefoxHeadless'],
singleRun: true,
port: 9876
};

if (process.env.TRAVIS) {
cfg.browsers = ['Firefox', 'Chrome_travis_ci'];
}

config.set(cfg);
};
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** @license | xtypejs-extension-custom-types v0.1.0 | (c) 2015, Lucas Ononiwu | MIT license, xtype.js.org/license.txt
/** @license | xtypejs-extension-custom-types v0.1.1 | (c) 2015, Lucas Ononiwu | MIT license, xtype.js.org/license.txt
*/

/**
Expand Down Expand Up @@ -28,7 +28,8 @@
'use strict';

var LIB_NAME = 'xtypejsCustomTypesExtension',
LIB_VERSION = '0.1.0';
LIB_INTERFACE_NAME = 'ext',
LIB_VERSION = '0.1.1';

function init(xtype) {

Expand Down Expand Up @@ -323,9 +324,10 @@

// -- Attach plugin functions --

xtype.ext = (xtype.ext || objCreate(null));
var libInterface = (xtype[LIB_INTERFACE_NAME] || objCreate(null));
xtype[LIB_INTERFACE_NAME] = libInterface;

xtype.ext.registerType = registerType;
libInterface.registerType = registerType;
}


Expand Down
Loading

0 comments on commit f426252

Please sign in to comment.