Coder Social home page Coder Social logo

yoichiro / generator-action Goto Github PK

View Code? Open in Web Editor NEW
11.0 2.0 2.0 221 KB

Yeoman Action Generator for generating a fulfillment code of an action for Google Assistant.

Home Page: https://www.npmjs.com/package/generator-action

License: MIT License

JavaScript 76.58% TypeScript 1.56% Java 12.98% Shell 6.29% Batchfile 2.59%

generator-action's Introduction

Yeoman Action Generator for Google Assistant

Yeoman Action Generator for Google Assistant creates everything you need to get started with action development. You can choose the following implementations:

  • Action Type: Actions SDK, Dialogflow or Multivocal.
  • Cloud Service:
    • Firebase Functions, Google Cloud Functions and Google AppEngine
    • Azure Functions and Azure Web Apps
  • Language: JavaScript, TypeScript or Java.

Also, you can create a complete code set for Actions on Google Codelab Level 1, 2 and 3.

NPM Version CircleCI

Prerequisite

You need to install the following:

  • NodeJS 8 or higher.

Getting Started

# Install Yeoman
$ npm install -g yo

# Install generator-action
$ npm install -g generator-action

# Make a project directory
$ mkdir <PROJECT_DIRECTORY_NAME>; cd <PROJECT_DIRECTORY_NAME>

# Invoke the generator with yo command
$ yo action

Generatable Projects

This generator can generate the following projects:

Firebase Functions

You can generate a project with a fulfillment code deployed to Firebase Functions. Also, you can choose a language from the following:

  • JavaScript
  • TypeScript

If Actions SDK or Dialogflow is selected as Action Type, the generated code depends on the Actions on Google Client Library for NodeJS. A different code is generated dependning on your selection from Actions SDK or Dialogflow. On the other hand, if Multivocal is selected as Action Type, the generated code depends on the Multivocal library.

If Actions SDK is selected, action.json Action Package file is generated. It can be used to register actions with gactions command.

Google Cloud Functions

You can generate a project with a fulfillment code deployed to Google Cloud Functions. Also, you can choose a language from the following:

  • JavaScript
  • TypeScript

If Actions SDK or Dialogflow is selected as Action Type, the generated code depends on the Actions on Google Client Library for NodeJS. A different code is generated dependning on your selection from Actions SDK or Dialogflow. On the other hand, if Multivocal is selected as Action Type, the generated code depends on the Multivocal library.

If Actions SDK is selected, action.json Action Package file is generated. It can be used to register actions with gactions command.

Google AppEngine

You can generate a project with a fulfillment code deployed to Google AppEngine. In this case, Java language is applied.

Actually, the generated code depends on the Actions on Google Client Library for Java. And, JAva Servlet class is created to handle requests. Also, Gradle build file is generated as the build system.

If Actions SDK is selected, action.json Action Package file is generated. It can be used to register actions with gactions command.

Azure Functions

You can generate a project with a fulfillment code deployed to Azure Functions. Currently, you can choose JavaScript only as source code language.

If Actions SDK or Dialogflow is selected as Action Type, the generated code depends on the Actions on Google Client Library for NodeJS. A different code is generated dependning on your selection from Actions SDK or Dialogflow.

If Actions SDK is selected, action.json Action Package file is generated. It can be used to register actions with gactions command.

Azure Web Apps

You can generate a project with a fulfillment code deployed to Azure Web Apps. Currently, you can choose Java only as source code language, but you can choose the build system from "Maven" or "Gradle".

If Actions SDK or Dialogflow is selected as Action Type, the generated code depends on the Actions on Google Client Library for Java. A different code is generated dependning on your selection from Actions SDK or Dialogflow.

If Actions SDK is selected, action.json Action Package file is generated. It can be used to register actions with gactions command.

Sample Code Set

You can generate a complete code set of Actions on Google Codelab Level 1, 2 and 3.

Actually, these generated code set are the same as the code set you can download from here.

Options

  • --skip-install

    Skips the automatic execution of bower and npm after scaffolding has finished.

  • skip-welcome-message

    Skips the welcome message.

  • skip-install-message

    Skips the message after the installation of dependencies.

generator-action's People

Contributors

yoichiro avatar

Stargazers

Alexandru-Cristian Zănogeanu avatar Bart Staszkiewicz avatar Matt Buck avatar Johan Euphrosine avatar Leo Camacho avatar Norihito Nishioka avatar  avatar Kuba Wolanin avatar Łukasz Byjoś avatar Giorgio Robino avatar Carlo Huamán avatar

Watchers

James Cloos avatar Guillaume G. Soucy avatar

generator-action's Issues

try to generator a action , but get error

yo action

module.js:491
throw err;
^

Error: Cannot find module 'duplexify'
at Function.Module._resolveFilename (module.js:489:15)
at Function.Module._load (module.js:439:25)
at Module.require (module.js:517:17)
at require (internal/module.js:11:18)
at Object. (/usr/local/lib/node_modules/yo/node_modules/got/index.js:8:17)
at Module._compile (module.js:573:30)
at Object.Module._extensions..js (module.js:584:10)
at Module.load (module.js:507:32)
at tryModuleLoad (module.js:470:12)
at Function.Module._load (module.js:462:3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.