New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

create-apps-script

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

create-apps-script

A tool to create a new local development package for a Google Apps Script project.

latest
Source
npmnpm
Version
1.1.35
Version published
Maintainers
1
Created
Source

create-apps-script

- Project-Scaffolder | Config-Contraptionator | DevTool-Assimilator -

Create a Local Apps Script Development Package in Seconds


npm License npm version
Build Status (Travis CI) Test Coverage (codecov)
David (Dependencies) David (Dev Dependencies)
Standard Code Style

	[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)


Overview

Features

  • Combines the most popular and effective development tools

    🤖 Use Babel to write and compile modern Javascript to Google Apps Script's ECMA spec.

    💬 Leverage ESLint to catch syntax errors and future bugs before deployment.

    ☕️ Use Mocha to follow Test-Driven-Development practices.

    • Webpack combines transpiling, minification, linting, and bundling into a single process.

Construct a Development Environment :construction_worker:

  • Run command to init a project:
    • npm: npm init gas-project [destination] [options]
    • yarn: yarn create gas-project [destination] [options]

      Note - If destination default is the current working directory
  • Answer the prompts and configure your development workspace.
  • Install dependencies using preferred package manager

Project Directory, Hard Defaults

The output directory will have the following structure:

  [target]/
    - .babelrc
    - .editorconfig
    - .eslintrc
    - .eslintignore
    - .gitignore
    - webpack.config.js
    + config/
     - appsscript.json
     - .clasp.json
       [ ... ]
    + dist/

    + src/
      - index.js
      - main.js

Detailed Usage Information

Arguments & Options 🏁

Arguments

NameRequiredDefault ValueDescription
targetNoCurrent working directory

Directory. Relative paths are resolved from the current working directory. Will create non-existent directory (but not recursively).

CLI Prompt & Package.json Field Default Values

Default Responses : How .npmrc and .yarnrc values are resolved

This program uses the 'rc' package internally to locate and utilize .npmrc / .yarnrc files/content at run time.

--

📑

Detailed File Creation Information

Package.json

devDependencies

A series of prompts regarding field values for the generated package.json file follow.

Aside from these fields, the package file contains a number of predefined properties within devDependencies. The majority of these modules are webpack loaders/plugins, eslint configurations/plugins, babel plugins, or @types/* definitions.

Detail of the provided dependencies, their version, and a brief explanation of their necessity is provided in the table below.

devDependency packageVersionPurpose
@babel/core^7.1.5Coming Soon
@babel/plugin-proposal-class-properties^7.1.0Coming Soon
@babel/plugin-proposal-object-rest-spread^7.0.0Coming Soon
@babel/plugin-transform-member-expression-literals^7.0.0Coming Soon
@babel/plugin-transform-object-assign^7.0.0Coming Soon
@babel/plugin-transform-property-literals^7.0.0Coming Soon
@babel/preset-env^7.1.5Coming Soon
@google/clasp^1.6.3Coming Soon
@types/google-apps-script^0.0.31Coming Soon
babel-eslint^10.0.1Coming Soon
babel-loader^8.0.4Coming Soon
babel-plugin-add-module-exports^1.0.0Coming Soon
babel-plugin-array-includes^2.0.3Coming Soon
clean-webpack-plugin^0.1.19Coming Soon
copy-webpack-plugin^4.6.0Coming Soon
eslint^5.9.0Coming Soon
eslint-loader^2.1.1Coming Soon
eslint-plugin-googleappsscript^1.0.1Coming Soon
gas-lib^2.0.2Coming Soon
gas-webpack-plugin^0.3.0Coming Soon
uglifyjs-webpack-plugin^2.0.1Coming Soon
webpack^4.25.1Coming Soon
webpack-cli^3.1.2Coming Soon


Eslint

In order to provide an eslint configuration file for the environment, create-gas-project exposes a partial eslint configuration object, containing properties and values specific to the Apps Script environment & tooling.

-- Base ESlint Configuration Object --

   {
     "root" : true,
     "plugins": [
       "googleappsscript"
     ],
     "globals": {
       "Calendar": true,
       "CalendarApp": true,
       "CardService": true,
       "Charts": true,
       "ContactsApp": true,
       "DataStudioApp": true,
       "DocumentApp": true,
       "Drive": true,
       "DriveApp": true,
       "FirebaseApp": true,
       "FormApp": true,
       "Gmail": true,
       "GmailApp": true,
       "GroupsApp": true,
       "HtmlService": true,
       "LanguageApp": true,
       "MailApp": true,
       "Maps": true,
       "OAuth1": true,
       "OAuth2": true,
       "PropertiesService": true,
       "SitesApp": true,
       "Slides": true,
       "SlidesApp": true,
       "SpreadsheetApp": true
     },
     "env": {
       “googleappsscript/googleappsscript” : true
     },
     "parser": "babel-eslint",
     "parseroptions" : {
       "sourceType" : "module"
     }
   }

In order to provide a complete and valid configuration to eslint, create-gas-project then adds an extends property to the object and prompts the user to select a value from the following:

  • 'eslint:recommended' (default)
  • 'standard'
  • 'airbnb-base'
  • A file system path to another configuration file

Once confirmed to be valid, the resolved absolute path is then assigned as the value of the "``extends``" field for the project’s eslint configuration.

Project Eslint Configuration The following settings are required in the Apps Script project’s development directory eslint configuration to ensure all tooling works as expected:


CREATING NEW



Actions

If existing files, confirm modification

FAQs

Package last updated on 17 Jun 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts