Skip to content
This repository has been archived by the owner on Jul 2, 2020. It is now read-only.

Commit

Permalink
Release 6.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
benm071 committed Mar 21, 2019
1 parent f4f9507 commit 6dfa1f9
Show file tree
Hide file tree
Showing 18 changed files with 62 additions and 34 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @oracle/generator-oraclejet 6.1.0
# @oracle/generator-oraclejet 6.2.0

## About the generator
This Yeoman generator for Oracle JET lets you quickly set up a project for use as a web application or hybrid mobile application for Android, iOS or Windows 10.
Expand Down
5 changes: 1 addition & 4 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
## Release Notes for generator-oraclejet ##

### 6.1.0
* No changes

### 6.0.0
### 6.2.0
* No changes

### 5.2.0
Expand Down
21 changes: 21 additions & 0 deletions common/hookRunner.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,27 @@ module.exports = {
}
};

module.exports = {
runAfterComponentCreateHook() {
return new Promise((resolve, reject) => {
// Get hooks config
const hooksConfig = _getHooksConfigObj();
// Get after_app_prepare hook's path
const hookPath = hooksConfig.after_component_create;
if (hookPath && fs.existsSync(path.resolve(hookPath))) {
const hook = require(path.resolve(hookPath)); // eslint-disable-line
// Execute hook
hook()
.then(() => resolve())
.catch(err => reject(err));
} else {
console.warn('Hook \'after_component_create\' not defined.');
resolve();
}
});
}
};

/**
* ## _getHooksConfigObj
* Reads the hooks.json file
Expand Down
2 changes: 1 addition & 1 deletion common/template/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const _WEB = 'web';

const BLANK_TEMPLATE = blankTemplate.BLANK_TEMPLATE;

const _TEMPLATES_NPM_URL = '@oracle/oraclejet-templates@~6.1.0';
const _TEMPLATES_NPM_URL = '@oracle/oraclejet-templates@~6.2.0';

const _TEMPLATES = [BLANK_TEMPLATE, 'basic', 'navbar', 'navdrawer'];

Expand Down
7 changes: 2 additions & 5 deletions generators/add-component/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,12 @@
Copyright (c) 2015, 2019, Oracle and/or its affiliates.
The Universal Permissive License (UPL), Version 1.0
*/
/**
Copyright (c) 2015, 2017, Oracle and/or its affiliates.
The Universal Permissive License (UPL), Version 1.0
*/

'use strict';

const generators = require('yeoman-generator');
const common = require('../../common');
const commonComponent = require('../../common/component');
const commonHookRunner = require('../../common/hookRunner');
const commonMessages = require('../../common/messages');
const commonTest = require('../../common/test');
const fs2 = require('fs');
Expand Down Expand Up @@ -48,6 +44,7 @@ const OracleJetAddComponentGenerator = generators.Base.extend(
this.options.component = this.componentName;
commonComponent.writeComponentTemplate(this)
.then(commonTest.writeTestTemplate)
.then(commonHookRunner.runAfterComponentCreateHook)
.then(() => {
done();
})
Expand Down
2 changes: 1 addition & 1 deletion generators/app/templates/blank/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<meta name="apple-mobile-web-app-title" content="Oracle JET">

<!-- injector:theme -->
<link rel="stylesheet" href="css/libs/oj/v6.1.0/alta/oj-alta-min.css" id="css" />
<link rel="stylesheet" href="css/libs/oj/v6.2.0/alta/oj-alta-min.css" id="css" />
<!-- endinjector -->

</head>
Expand Down
6 changes: 3 additions & 3 deletions generators/app/templates/blank/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ requirejs.config(
'promise': 'libs/es6-promise/es6-promise',
'hammerjs': 'libs/hammer/hammer-2.0.8',
'ojdnd': 'libs/dnd-polyfill/dnd-polyfill-1.0.0',
'ojs': 'libs/oj/v6.1.0/debug',
'ojL10n': 'libs/oj/v6.1.0/ojL10n',
'ojtranslations': 'libs/oj/v6.1.0/resources',
'ojs': 'libs/oj/v6.2.0/debug',
'ojL10n': 'libs/oj/v6.2.0/ojL10n',
'ojtranslations': 'libs/oj/v6.2.0/resources',
'text': 'libs/require/text',
'signals': 'libs/js-signals/signals',
'customElements': 'libs/webcomponents/custom-elements.min',
Expand Down
4 changes: 2 additions & 2 deletions generators/app/templates/blank/js/path_mapping.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"use": "local",

"cdns": {
"jet": "https://static.oracle.com/cdn/jet/v6.1.0/default/js",
"3rdparty": "https://static.oracle.com/cdn/jet/v6.1.0/3rdparty"
"jet": "https://static.oracle.com/cdn/jet/v6.2.0/default/js",
"3rdparty": "https://static.oracle.com/cdn/jet/v6.2.0/3rdparty"
},

"libs": {
Expand Down
6 changes: 3 additions & 3 deletions generators/app/templates/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"version": "1.0.0",
"description": "An Oracle JavaScript Extension Toolkit(JET) web app",
"dependencies": {
"@oracle/oraclejet": "~6.1.0"
"@oracle/oraclejet": "~6.2.0"
},
"devDependencies": {
"grunt": "^1.0.1",
"@oracle/grunt-oraclejet": "~6.1.0",
"@oracle/grunt-oraclejet": "~6.2.0",
"load-grunt-config": "0.19.2",
"@oracle/oraclejet-tooling": "~6.1.0",
"@oracle/oraclejet-tooling": "~6.2.0",
"qunit-reporter-junit": "^1.1.1",
"qunit": "^2.4.1"
},
Expand Down
2 changes: 1 addition & 1 deletion generators/hybrid/templates/blank/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<link rel="icon" href="css/images/favicon.ico" type="image/x-icon" />

<!-- injector:theme -->
<link rel="stylesheet" href="css/libs/oj/v6.1.0/alta/oj-alta-min.css" id="css" />
<link rel="stylesheet" href="css/libs/oj/v6.2.0/alta/oj-alta-min.css" id="css" />
<!-- endinjector -->

</head>
Expand Down
6 changes: 3 additions & 3 deletions generators/hybrid/templates/blank/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ requirejs.config(
'promise': 'libs/es6-promise/es6-promise',
'hammerjs': 'libs/hammer/hammer-2.0.8',
'ojdnd': 'libs/dnd-polyfill/dnd-polyfill-1.0.0',
'ojs': 'libs/oj/v6.1.0/debug',
'ojL10n': 'libs/oj/v6.1.0/ojL10n',
'ojtranslations': 'libs/oj/v6.1.0/resources',
'ojs': 'libs/oj/v6.2.0/debug',
'ojL10n': 'libs/oj/v6.2.0/ojL10n',
'ojtranslations': 'libs/oj/v6.2.0/resources',
'text': 'libs/require/text',
'signals': 'libs/js-signals/signals',
'customElements': 'libs/webcomponents/custom-elements.min',
Expand Down
4 changes: 2 additions & 2 deletions generators/hybrid/templates/blank/js/path_mapping.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"use": "local",

"cdns": {
"jet": "https://static.oracle.com/cdn/jet/v6.1.0/default/js",
"3rdparty": "https://static.oracle.com/cdn/jet/v6.1.0/3rdparty"
"jet": "https://static.oracle.com/cdn/jet/v6.2.0/default/js",
"3rdparty": "https://static.oracle.com/cdn/jet/v6.2.0/3rdparty"
},

"libs": {
Expand Down
6 changes: 3 additions & 3 deletions generators/hybrid/templates/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
"version": "1.0.0",
"description": "An Oracle JavaScript Extension Toolkit (JET) mobile app",
"dependencies": {
"@oracle/oraclejet": "~6.1.0"
"@oracle/oraclejet": "~6.2.0"
},
"devDependencies": {
"fs-extra": "0.30.0",
"grunt": "^1.0.1",
"@oracle/grunt-oraclejet": "~6.1.0",
"@oracle/grunt-oraclejet": "~6.2.0",
"load-grunt-config": "0.19.2",
"@oracle/oraclejet-tooling": "~6.1.0",
"@oracle/oraclejet-tooling": "~6.2.0",
"qunit-reporter-junit": "^1.1.1",
"qunit": "^2.4.1"
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@oracle/generator-oraclejet",
"version": "6.1.0",
"version": "6.2.0",
"license": "UPL-1.0",
"description": "Yeoman generator for Oracle JET web and mobile applications",
"homepage": "http://oraclejet.org",
Expand Down
12 changes: 12 additions & 0 deletions template/common/scripts/hooks/after_component_create.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
Copyright (c) 2015, 2019, Oracle and/or its affiliates.
The Universal Permissive License (UPL), Version 1.0
*/
'use strict';

module.exports = function () {
return new Promise((resolve) => {
console.log('Running after_component_create hook.');
resolve();
});
};
1 change: 1 addition & 0 deletions template/common/scripts/hooks/hooks.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"hooks": {
"after_app_create": "scripts/hooks/after_app_create.js",
"after_app_restore": "scripts/hooks/after_app_restore.js",
"after_component_create": "scripts/hooks/after_component_create.js",
"before_build": "scripts/hooks/before_build.js",
"before_release": "scripts/hooks/before_release.js",
"after_build": "scripts/hooks/after_build.js",
Expand Down
2 changes: 1 addition & 1 deletion template/component/component.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@component@",
"version": "1.0.0",
"jetVersion": "^6.1.0",
"jetVersion": "^6.2.0",
"displayName": "A user friendly, translatable name of the pack.",
"description": "A translatable high-level description for the pack.",
"properties": {
Expand Down
6 changes: 3 additions & 3 deletions template/test/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ requirejs.config(
'promise' : 'libs/es6-promise/es6-promise',
'hammerjs' : 'libs/hammer/hammer-2.0.8',
'ojdnd' : 'libs/dnd-polyfill/dnd-polyfill-1.0.0',
'ojs' : 'libs/oj/v6.1.0/debug',
'ojL10n' : 'libs/oj/v6.1.0/ojL10n',
'ojtranslations' : 'libs/oj/v6.1.0/resources',
'ojs' : 'libs/oj/v6.2.0/debug',
'ojL10n' : 'libs/oj/v6.2.0/ojL10n',
'ojtranslations' : 'libs/oj/v6.2.0/resources',
'text' : 'libs/require/text',
'css' : 'libs/require-css/css',
'signals' : 'libs/js-signals/signals',
Expand Down

0 comments on commit 6dfa1f9

Please sign in to comment.