-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
78 changed files
with
700 additions
and
573 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
#! /usr/bin/env node | ||
#! /usr/bin/env node | ||
/** | ||
Copyright (c) 2015, 2023, Oracle and/or its affiliates. | ||
Copyright (c) 2015, 2024, Oracle and/or its affiliates. | ||
Licensed under The Universal Permissive License (UPL), Version 1.0 | ||
as shown at https://oss.oracle.com/licenses/upl/ | ||
*/ | ||
|
||
'use strict'; | ||
|
||
/** | ||
* ## Dependencies | ||
*/ | ||
const util = require('./util'); | ||
|
||
/** | ||
* # 'addJsdoc' | ||
* | ||
* @public | ||
* @param {Object} options | ||
* @returns {Promise} | ||
*/ | ||
module.exports = function (options) { | ||
util.log('Installing jsdoc'); | ||
const installer = util.getInstallerCommand({ options }); | ||
|
||
return util.spawn(installer.installer, [installer.verbs.install, '[email protected]', '--save-dev=true', '--save-exact']); | ||
}; | ||
|
||
'use strict'; | ||
|
||
/** | ||
* ## Dependencies | ||
*/ | ||
const util = require('./util'); | ||
|
||
/** | ||
* # 'addJsdoc' | ||
* | ||
* @public | ||
* @param {Object} options | ||
* @returns {Promise} | ||
*/ | ||
module.exports = function (options) { | ||
util.log('Installing jsdoc'); | ||
const installer = util.getInstallerCommand({ options }); | ||
|
||
return util.spawn(installer.installer, [installer.verbs.install, '[email protected]', installer.flags.save, installer.flags.exact]); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,35 @@ | ||
#! /usr/bin/env node | ||
#! /usr/bin/env node | ||
/** | ||
Copyright (c) 2015, 2023, Oracle and/or its affiliates. | ||
Copyright (c) 2015, 2024, Oracle and/or its affiliates. | ||
Licensed under The Universal Permissive License (UPL), Version 1.0 | ||
as shown at https://oss.oracle.com/licenses/upl/ | ||
*/ | ||
|
||
'use strict'; | ||
|
||
/** | ||
* ## Dependencies | ||
*/ | ||
const util = require('./util'); | ||
const config = require('./config'); | ||
|
||
/** | ||
* # 'addPcss' | ||
* | ||
* @public | ||
* @param {Object} options | ||
* @returns {Promise} | ||
*/ | ||
module.exports = function (options) { | ||
const installer = util.getInstallerCommand({ options }); | ||
util.log('Installing sass and pcss'); | ||
config.loadOraclejetConfig(); | ||
const sassVer = config.data.sassVer; | ||
|
||
return util.spawn(installer.installer, [installer.verbs.install, | ||
`node-sass@${sassVer}`, | ||
'[email protected]', | ||
'[email protected]', | ||
'--save-dev=true']); | ||
}; | ||
|
||
'use strict'; | ||
|
||
/** | ||
* ## Dependencies | ||
*/ | ||
const util = require('./util'); | ||
const config = require('./config'); | ||
|
||
/** | ||
* # 'addPcss' | ||
* | ||
* @public | ||
* @param {Object} options | ||
* @returns {Promise} | ||
*/ | ||
module.exports = function (options) { | ||
const installer = util.getInstallerCommand({ options }); | ||
util.log('Installing sass and pcss'); | ||
config.loadOraclejetConfig(); | ||
const sassVer = config.data.sassVer; | ||
|
||
return util.spawn(installer.installer, [installer.verbs.install, | ||
`node-sass@${sassVer}`, | ||
'[email protected]', | ||
'[email protected]', | ||
installer.flags.save]); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,31 @@ | ||
#! /usr/bin/env node | ||
#! /usr/bin/env node | ||
/** | ||
Copyright (c) 2015, 2023, Oracle and/or its affiliates. | ||
Copyright (c) 2015, 2024, Oracle and/or its affiliates. | ||
Licensed under The Universal Permissive License (UPL), Version 1.0 | ||
as shown at https://oss.oracle.com/licenses/upl/ | ||
*/ | ||
|
||
'use strict'; | ||
|
||
/** | ||
* ## Dependencies | ||
*/ | ||
const util = require('./util'); | ||
const config = require('./config'); | ||
|
||
/** | ||
* # 'addSass' | ||
* | ||
* @public | ||
* @param {Object} options | ||
* @returns {Promise} | ||
*/ | ||
module.exports = function (options) { | ||
config.loadOraclejetConfig(); | ||
const sassVer = config.data.sassVer; | ||
const installer = util.getInstallerCommand({ options }); | ||
|
||
util.log('Installing node-sass'); | ||
return util.spawn(installer.installer, [installer.verbs.install, `node-sass@${sassVer}`, '--save-dev=true']); | ||
}; | ||
|
||
'use strict'; | ||
|
||
/** | ||
* ## Dependencies | ||
*/ | ||
const util = require('./util'); | ||
const config = require('./config'); | ||
|
||
/** | ||
* # 'addSass' | ||
* | ||
* @public | ||
* @param {Object} options | ||
* @returns {Promise} | ||
*/ | ||
module.exports = function (options) { | ||
config.loadOraclejetConfig(); | ||
const sassVer = config.data.sassVer; | ||
const installer = util.getInstallerCommand({ options }); | ||
|
||
util.log('Installing node-sass'); | ||
return util.spawn(installer.installer, [installer.verbs.install, `node-sass@${sassVer}`, installer.flags.save]); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,50 @@ | ||
/** | ||
Copyright (c) 2015, 2023, Oracle and/or its affiliates. | ||
Copyright (c) 2015, 2024, Oracle and/or its affiliates. | ||
Licensed under The Universal Permissive License (UPL), Version 1.0 | ||
as shown at https://oss.oracle.com/licenses/upl/ | ||
*/ | ||
const path = require('path'); | ||
const CONSTANTS = require('./constants'); | ||
const util = require('./util'); | ||
const config = require('./config'); | ||
|
||
/** | ||
* ## injectOjetConfig | ||
* | ||
* Inject default ojet.config file into the application | ||
* | ||
* @private | ||
* @returns {Promise} | ||
*/ | ||
function injectOJetConfig() { | ||
return util.injectFileIntoApplication({ | ||
name: CONSTANTS.OJET_CONFIG, | ||
src: path.join(util.getToolingPath(), CONSTANTS.PATH_TO_OJET_CONFIG_TEMPLATE), | ||
dest: CONSTANTS.OJET_CONFIG | ||
}); | ||
} | ||
|
||
/** | ||
* Install webpack and required loaders from NPM | ||
* @param {Object} options | ||
* @returns | ||
*/ | ||
function installWebpack(options) { | ||
util.log('Installing webpack and required dependencies'); | ||
const installer = util.getInstallerCommand({ options }); | ||
config.loadOraclejetConfig(); | ||
const webpackLibraries = config.data.webpackLibraries; | ||
|
||
const command = ` | ||
${installer.installer} ${installer.verbs.install} ${webpackLibraries} | ||
--save-dev --save-exact | ||
`.replace(/\n/g, '').replace(/\s+/g, ' '); | ||
return util.exec(command); | ||
} | ||
|
||
module.exports = function (options) { | ||
return installWebpack(options) | ||
.then(injectOJetConfig) | ||
.catch(util.log.error); | ||
}; | ||
const path = require('path'); | ||
const CONSTANTS = require('./constants'); | ||
const util = require('./util'); | ||
const config = require('./config'); | ||
|
||
/** | ||
* ## injectOjetConfig | ||
* | ||
* Inject default ojet.config file into the application | ||
* | ||
* @private | ||
* @returns {Promise} | ||
*/ | ||
function injectOJetConfig() { | ||
return util.injectFileIntoApplication({ | ||
name: CONSTANTS.OJET_CONFIG, | ||
src: path.join(util.getToolingPath(), CONSTANTS.PATH_TO_OJET_CONFIG_TEMPLATE), | ||
dest: CONSTANTS.OJET_CONFIG | ||
}); | ||
} | ||
|
||
/** | ||
* Install webpack and required loaders from NPM | ||
* @param {Object} options | ||
* @returns | ||
*/ | ||
function installWebpack(options) { | ||
util.log('Installing webpack and required dependencies'); | ||
const installer = util.getInstallerCommand({ options }); | ||
config.loadOraclejetConfig(); | ||
const webpackLibraries = config.data.webpackLibraries; | ||
|
||
const command = ` | ||
${installer.installer} ${installer.verbs.install} ${webpackLibraries} | ||
${installer.flags.save} ${installer.flags.exact} | ||
`.replace(/\n/g, '').replace(/\s+/g, ' '); | ||
return util.exec(command); | ||
} | ||
|
||
module.exports = function (options) { | ||
return installWebpack(options) | ||
.then(injectOJetConfig) | ||
.catch(util.log.error); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.