You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, i am now using the load-grunt-config with grunt-prompt to distribute to developers to work on some front-end tasks especially components based development, it's great for every tasks i can slice using load-grunt-config.
However i would like have a command-line based interface for developer to select their components to develop, so i chose grunt-prompt to achieve that but i got some problem to pass the developer selected component options to the data object in load-grunt-config.
This is the Gruntfile.js, I have defined a component field in the data object.
Developer selected a component and store to grunt.config.
prompt.js
return {
default: {
options: {
questions: [
{
// Top Menu Options
config: 'component',
...
The execute.js is able to print the selected component option after running prompt.js.
execute.js
module.exports = function (grunt) {
grunt.registerTask('execute', '', function () {
console.log(grunt.config('component')); // able to print the selected component option
console.log('Executing procedure...');
...
I am trying to get the grunt.template work in pug.js, i noticed that load-grunt-config have a data object for this case, but it's already initiated before running prompt.js, so the following <%= component %> is undefined, any suggestion to solve this case?
Hi @yuepywu, not quite sure that it would be easy to implement such scenario. The only visible option for me right now is to perform prompting before grunt execution, in this case you will have everything that you need before load-grunt-config initialisation.
Hi, i am now using the load-grunt-config with grunt-prompt to distribute to developers to work on some front-end tasks especially components based development, it's great for every tasks i can slice using load-grunt-config.
However i would like have a command-line based interface for developer to select their components to develop, so i chose grunt-prompt to achieve that but i got some problem to pass the developer selected component options to the data object in load-grunt-config.
This is the Gruntfile.js, I have defined a component field in the data object.
Here is the tree of tasks.
tasks/
This will run prompt then execute tasks.
aliases.js
Developer selected a component and store to grunt.config.
prompt.js
The execute.js is able to print the selected component option after running prompt.js.
execute.js
I am trying to get the grunt.template work in pug.js, i noticed that load-grunt-config have a data object for this case, but it's already initiated before running prompt.js, so the following <%= component %> is undefined, any suggestion to solve this case?
pug.js
The text was updated successfully, but these errors were encountered: