Giter VIP home page Giter VIP logo

automation's Introduction

Automation

Introduction

A collection of automated scripts for processing sites / content.

Uses CasperJS.

Scripts

The following scripts are in this repo:

Template

https://github.com/ibrennan/automation/tree/master/template This is the template script, duplicate it and use it as the base for automated processes.

Critical CSS

https://github.com/ibrennan/automation/tree/master/content/critical-css Used to create the critical CSS for your site, improves browser paint speeds. Inspired by this post: http://paul.kinlan.me/detecting-critical-above-the-fold-css/

Automated responsive screenshots

https://github.com/ibrennan/automation/tree/master/tests/screenshot This script will run through your defined list of URLs (input/data.csv) and generate a screenshot of each page at the defined resolutions. The results of the script will be stored in the 'output' directory. Blog post here: https://medium.com/p/197fad8c1840

Running Scripts

  1. Ensure you have CasperJS installed on your machine: http://casperjs.org
  2. Open Terminal, and CD to your script "CD ~/automation/content/critical-css"
  3. Then run "casperjs app.js"
  4. Follow the prompts on screen

Note: Some scripts have their own procedue to run, please check the README.md in the directory for specific steps.

Results

All application (test / content / whatever you decide) results, by default, are output to output/results.json.

The format of this output is entirely upto you, and will be defined by the type of scripts you run.

Template

There is a template application in /template/app.js. When starting a new CasperJS automation script you should copy this directory, and alter as required. For most uses, you'll only likely need to modify two areas of the code:

Setup

This is where you define the general variables, and libraries required to run the script.

Action

This is where we can evaluate our page, manipulate content, and run test scripts. At the end of the Action section we can push the data into our results object.

automation's People

Contributors

ibrennan avatar

Watchers

James Cloos avatar  avatar

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.