Socket
Socket
Sign inDemoInstall

ampsalesfunnels

Package Overview
Dependencies
46
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ampsalesfunnels

https://ampsalesfunnels.com - tool support - Build blazingly fast sales funnels, learn coding, and get rich


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

ampsalesfunnels

Functions

getConfig(rootPath)

Get the path configurations for the project.

run(command)

function run is the entrypoint of the AMPSalesfunnels build system.

ampsalesfunnelsUiClean(done)

Task to delete environment variables pointing to the site and AMPSalesfunnels UI API. These need to be removed so we can wait on their creation on ampsalesfunnelsUiCreate() so we know when to write the index.html file with redirect to AMPSalesfunnels UI.

dotenvHandler(request, response, next)

Get the environment variables as configured in .env file in the root of the project.

Result is object where BASIC=basic becomes {BASIC: 'basic'}

packageJsonHandler(request, response, next)

Get the package.json file in the root of the project.

emailSendHandler(request, response, next)

Handle email send.

Handle GET request in format https://myserver/emailsend/?to=&name=

validateHandler(request, response, next)

Handle validator sets.

Handle GET request in format https://myserver/validate/, where can be 'all' to execute all validator sets, or a specific validator set like: dotenv

ampsalesfunnelsUIAPI(corsOrigin)

Server to service requests from the AMPSalesfunnels UI application

dotenvExistsAndValid(path)

Validate the given file in .env format.

validateSandboxProduction(dotenvConfig, variable)ValidationResult

Validate occurance of variable.

If for example variable SMTP_USERNAME is available, variable SANDBOX_SMTP_USERNAME and PRODUCTION_SMTP_USERNAME should not be there. If SMTP_USERNAME is not available, then SANDBOX_SMTP_USERNAME and PRODUCTION_SMTP_USERNAME must both be available, or both not be available.

logValidationResults(validationResults)void

Log the validation results.

packageJsonValidateAll(filepath)

Execute all validations for the given file in package.json format.

packageJsonExistsAndValid(filepath)

Validate the given file in package.json format.

validateAll(rootPath)Array.<ValidationResult>

Execute all validators.

validateJsonWithSchema(filepath, schemafilepath)Object

Validate the given json file against json schema.

loadDotenv(filepath)Object.<string, string>

Load the environment variables from specified .env file.

loadPackageJson(filepath)Object.<string, string>

Load the package.json format file from specified path.

ampsalesfunnelsfunctions()

On change of a file in paths.ampsalesfunnelsfunctions.src touch the sentinel function file paths.ampsalesfunnelsfunctions.src so all functions are reloaded.

ampsalesfunnelsUiCreate(done)

Task to create index.html with redirect to AMPSalesfunnels UI.

ampValidate()

Check resulting output AMP HTML pages for validity.

clean()

Remove all files from the distribution directories for the static site and the functions, and also clean the temp folder used for intermediate build results. directory.

favicon()

Copy favicon files to distribution.

functions()

Copy the function files in their own folder to the distribution. In the function folders copy the .env file and the prodcts folder, because each function has a sandboxed context.

html()

Build the HTML files. Only files in the folder 'pages' are built. We don't want to build partials! Use the AMP Optimizer to add any scripts required by AMP components, and to perform the optimizations done by AMP caches right here in our HTML, greatly speeding up our AMP pages when served from our origin.

iframe()

Build the iframe HTML files. Only files from 'iframe' are built.

images()

Copy images to distribution.

rootConfig()

Copy the root config files to the distribution.

tailwindcss()

In development copy the tailwind.min.css to the static site distribution. In production copy the optimized (purged) TailWind CSS file to the static site distribution.

validate()

Execute all validators.

watchmode()

Sets up live-reloading: Changes to HTML or CSS trigger a build, changes to images, favicon, root config files and server only result in images, favicon, root config files, server and helper classes being copied again to dist.

Typedefs

doneCallback : function

Task done callback function.

Severity : 'WARNING' | 'ERROR'
ValidationResult : object

getConfig(rootPath)

Get the path configurations for the project.

Kind: global function

ParamTypeDescription
rootPathstring

the root directory of the project

run(command)

function run is the entrypoint of the AMPSalesfunnels build system.

Kind: global function

ParamTypeDescription
commandstring

supported AMPSalesfunnels commands: start, startproduction, build, clean, validate, netlifyDeploySandbox, netlifyDeployProduction

ampsalesfunnelsUiClean(done)

Task to delete environment variables pointing to the site and AMPSalesfunnels UI API. These need to be removed so we can wait on their creation on ampsalesfunnelsUiCreate() so we know when to write the index.html file with redirect to AMPSalesfunnels UI.

Kind: global function

ParamTypeDescription
done*

done function to call at end of task

dotenvHandler(request, response, next)

Get the environment variables as configured in .env file in the root of the project.

Result is object where BASIC=basic becomes {BASIC: 'basic'}

Kind: global function

ParamType
request*
response*
next*

packageJsonHandler(request, response, next)

Get the package.json file in the root of the project.

Kind: global function

ParamType
request*
response*
next*

emailSendHandler(request, response, next)

Handle email send.

Handle GET request in format https://myserver/emailsend/?to=&name=

Kind: global function

ParamType
request*
response*
next*

validateHandler(request, response, next)

Handle validator sets.

Handle GET request in format https://myserver/validate/, where can be 'all' to execute all validator sets, or a specific validator set like: dotenv

Kind: global function

ParamType
request*
response*
next*

ampsalesfunnelsUIAPI(corsOrigin)

Server to service requests from the AMPSalesfunnels UI application

Kind: global function

ParamTypeDescription
corsOriginstring

domain accessing the AMPSalesfunnels UI API

dotenvExistsAndValid(path) ⇒

Validate the given file in .env format.

Kind: global function Returns:

ValidationResults[]

ParamType
pathstring

dotenvExistsAndValid~validationResults : Array.<ValidationResult>

Kind: inner constant of dotenvExistsAndValid

dotenvExistsAndValid~validationResult : ValidationResult

Kind: inner constant of dotenvExistsAndValid

validateSandboxProduction(dotenvConfig, variable) ⇒ ValidationResult

Validate occurance of variable.

If for example variable SMTP_USERNAME is available, variable SANDBOX_SMTP_USERNAME and PRODUCTION_SMTP_USERNAME should not be there. If SMTP_USERNAME is not available, then SANDBOX_SMTP_USERNAME and PRODUCTION_SMTP_USERNAME must both be available, or both not be available.

Kind: global function

ParamTypeDescription
dotenvConfig*

.env configuration

variablestring

variable base name

logValidationResults(validationResults) ⇒ void

Log the validation results.

Kind: global function

ParamType
validationResultsArray.<ValidationResult>

packageJsonValidateAll(filepath) ⇒

Execute all validations for the given file in package.json format.

Kind: global function Returns:

ValidationResults[]

ParamType
filepathstring

packageJsonExistsAndValid(filepath) ⇒

Validate the given file in package.json format.

Kind: global function Returns:

ValidationResults[]

ParamType
filepathstring

validateAll(rootPath) ⇒ Array.<ValidationResult>

Execute all validators.

Kind: global function

ParamType
rootPathstring

validateAll~validationResults : Array.<ValidationResult>

Kind: inner property of validateAll

validateJsonWithSchema(filepath, schemafilepath) ⇒ Object

Validate the given json file against json schema.

Kind: global function

ParamTypeDescription
filepathstring

file path to the JSON file

schemafilepathstring

file path to the JSON Schema file

validateJsonWithSchema~validationResults : Array.<ValidationResult>

Kind: inner constant of validateJsonWithSchema

loadDotenv(filepath) ⇒ Object.<string, string>

Load the environment variables from specified .env file.

Kind: global function Returns: Object.<string, string> -

  • object where BASIC=basic becomes {BASIC: 'basic'}
ParamTypeDescription
filepathstring

path to .env file

loadPackageJson(filepath) ⇒ Object.<string, string>

Load the package.json format file from specified path.

Kind: global function Returns: Object.<string, string> -

  • object where BASIC=basic becomes {BASIC: 'basic'}
ParamTypeDescription
filepathstring

path to .env file

doneCallback : function

Task done callback function.

Kind: global typedef

Severity : 'WARNING' | 'ERROR'

Kind: global typedef

ValidationResult : object

Kind: global typedef Properties

NameTypeDescription
severitySeverity

severity of the validation result (WARNING, ERROR)

titlestring

title of the validation result

descriptionstring

description of the validation result

[solution]string

key indicating solution for validation result (used by AMPSalesfunnels UI)

ampsalesfunnelsfunctions()

On change of a file in paths.ampsalesfunnelsfunctions.src touch the sentinel function file paths.ampsalesfunnelsfunctions.src so all functions are reloaded.

Kind: global function Category: Gulp task

ampsalesfunnelsUiCreate(done)

Task to create index.html with redirect to AMPSalesfunnels UI.

Kind: global function Category: Gulp task

ParamTypeDescription
done*

done function to call at end of task

ampValidate()

Check resulting output AMP HTML pages for validity.

Kind: global function Category: Gulp task

clean()

Remove all files from the distribution directories for the static site and the functions, and also clean the temp folder used for intermediate build results. directory.

Kind: global function Category: Gulp task

favicon()

Copy favicon files to distribution.

Kind: global function Category: Gulp task

functions()

Copy the function files in their own folder to the distribution. In the function folders copy the .env file and the prodcts folder, because each function has a sandboxed context.

Kind: global function Category: Gulp task

html()

Build the HTML files. Only files in the folder 'pages' are built. We don't want to build partials! Use the AMP Optimizer to add any scripts required by AMP components, and to perform the optimizations done by AMP caches right here in our HTML, greatly speeding up our AMP pages when served from our origin.

Kind: global function Category: Gulp task

iframe()

Build the iframe HTML files. Only files from 'iframe' are built.

Kind: global function Category: Gulp task

images()

Copy images to distribution.

Kind: global function Category: Gulp task

rootConfig()

Copy the root config files to the distribution.

Kind: global function Category: Gulp task

tailwindcss()

In development copy the tailwind.min.css to the static site distribution. In production copy the optimized (purged) TailWind CSS file to the static site distribution.

Kind: global function Category: Gulp task

validate()

Execute all validators.

Kind: global function Category: Gulp task

validate~validationResults : Array.<ValidationResult>

Kind: inner constant of validate

watchmode()

Sets up live-reloading: Changes to HTML or CSS trigger a build, changes to images, favicon, root config files and server only result in images, favicon, root config files, server and helper classes being copied again to dist.

Kind: global function Category: Gulp task


© 2021 Dellariva Solutions

FAQs

Last updated on 05 Nov 2021

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc