npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

grunt-vtex-deploy

v0.20.3

Published

VTEX deploy for front end projects

Downloads

83

Readme

grunt-vtex-deploy

VTEX Deploy for front end projects

Release History

0.11.0: Watch out! Breaking changes. For the old API, use v0.8.1.

The "vtex_deploy" task

IMPORTANT: Required Environment Variables

  • S3 access key: S3_KEY
  • S3 secret key: S3_SECRET
  • S3 bucket: S3_BUCKET

Interesting options

options.tempDirectory:

Default value: "./tmp-deploy/"

options.requireEnvironmentType:

Default value: process.env["ENVIRONMENT_TYPE"] If you need a target to only run in a given environment type (e.g., stable).

options.bucket:

Default value: "vtex-io" The bucket to which your files will be uploaded.

options.cwd:

Default value: empty string. A root directory regarding every file referenced in this target. This will not be appended to the target destination, on upload. This is the point of this property.

options.publish:

Default value: false Whether your package should automatically update the corresponding "tag" to your version in the index.json file. When you have a version component to your upload, your version will be added to your package in the index.json file. If publish is true, the tag corresponding to the version will be updated to the uploaded version. E.g. if you just published version 1.2.3-beta, the "beta" tag will be updated with version "1.2.3-beta".

options.upload.version:

Default value: false A target: source map. If target is a directory, source may be a glob. If you wish to upload some files at the version directory of your app's folder (e.g. v01-00-00-stable-28). See the usage example.

options.upload.root:

Default value: false A target: source map. If target is a directory, source may be a glob. If you wish to upload some files at the root of your app's folder. See the usage example.

options.transform:

Conveniently replace special parts of every file in the files array. Pass a replace map with regex as keys and your desired replacements as values. The special {{version}} value gets translated to a version name, e.g. v01-00-00-stable-28

Usage Example

(More usage examples in JS on Gruntfile.js)

vtex_deploy:
  main:
    cwd: "build"
    upload:
      version:
        "/": "**"

      root:
        "index.html": "index.html"

    transform:
      replace:
        "/vtex_deploy/": "//io.vtex.com.br/vtex_deploy/{{version}}/"
        VERSION_DIRECTORY: "{{version}}"

      files: ["index.html", "test1"]

Result:

Running "vtex_deploy:main" (vtex_deploy) task
Using temp directory: ./tmp-deploy/
Cleaning temp directory...
Copying upload files to temp directory...
Copied 5 files

Starting preprocessing
Files: [ 'build/index.html', 'build/test1' ]
Processed tmp-deploy/build/index.html
Processed tmp-deploy/build/test1

Using bucket: vtex-io
Root upload path: vtex_deploy
Version upload path: vtex_deploy/0.11.0
Starting upload...
Uploaded all files successfully!
List of uploaded files:
https://vtex-io.s3.amazonaws.com/vtex_deploy/0.11.0/index.debug.html
https://vtex-io.s3.amazonaws.com/vtex_deploy/0.11.0/index.html
https://vtex-io.s3.amazonaws.com/vtex_deploy/0.11.0/recursive/test1
https://vtex-io.s3.amazonaws.com/vtex_deploy/0.11.0/test1
https://vtex-io.s3.amazonaws.com/vtex_deploy/0.11.0/test2
https://vtex-io.s3.amazonaws.com/vtex_deploy/index.html
Updating registry index...
Version updated at https://vtex-io.s3.amazonaws.com/index.json