diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md deleted file mode 100644 index 90ed23df3..000000000 --- a/.github/CONTRIBUTING.md +++ /dev/null @@ -1,279 +0,0 @@ -# Contributing - -## Welcome! -We're excited for your interest in Greenwood, and maybe even your contribution! - -> _We encourage all contributors to first read about the project's vision and motivation's on the website's [About page](https://www.greenwoodjs.io/about/). Greenwood is opinionated in the sense that it is designed to support development for the modern web platform and aims to deliver a first class developer experience tailored for that expectation. So if that page is the "why", this page is the "how"._ - -## Setup - -To develop for the project, you'll want to follow these steps: - -1. Have [NodeJS LTS](https://nodejs.org) installed and [Yarn](https://yarnpkg.com/) -1. Clone the repository -1. Run `yarn install` - -If developing with Node Version Manager: - -- Windows: [NVM for Windows](https://github.com/coreybutler/nvm-windows/releases) -- Linux/MacOS: [Node Version Manager](https://github.com/nvm-sh/nvm) - -You can confirm by running the following - -```sh -$ nvm use -Found '/Users//greenwood/.nvmrc' with version <14.17.0> -Now using node v14.17.0 (npm v6.14.13) -``` - -## Technical Design Overview - -The Greenwood GitHub repository is a combination [Yarn workspace](https://classic.yarnpkg.com/en/docs/workspaces/) and [Lerna monorepo](https://github.com/lerna/lerna). The root level _package.json_ defines the workspaces and shared tooling used throughout the project, like for linting, testing, etc. - -The two main directories are: -- [_packages/_](https://github.com/ProjectEvergreen/greenwood/tree/master/packages) - Packages published to NPM under the `@greenwood/` scope -- [_www/_](https://github.com/ProjectEvergreen/greenwood/tree/master/www) - [website](https://www.greenwoodjs.io) / documentation code - - -> _This guide is mainly intended to walk through the **cli** package; it being the principal package within the project supporting all other packages._ - -### CLI - -The CLI is the main entry point for Greenwood, similar to how the [front-controller pattern](https://en.wikipedia.org/wiki/Front_controller) works. When users run a command like `greenwood build`, they are effectively invoking the file _src/index.js_ within the `@greenwood/cli` package. - -At a high level, this is how a command goes through the CLI: -1. Each documented command a user can run maps to a script in the _commands/_ directory. -1. Each command can invoke any number of lifecycles from the _lifecycles/_ directory. -1. Lifecycles capture specific steps needed to build a site, serve it, generate a content dependency graph, etc. - - -#### Layout -The [layout](https://github.com/ProjectEvergreen/greenwood/tree/master/packages/cli/src) of the CLI package is as follows: - -- _index.js_ - Front controller -- _commands/_ - map to runnable userland commands -- _config/_ - Tooling configuration that Greenwood creates -- _data/_ - Custom GraphQL server and client side utilities -- _lib/_ - Custom utility and client facing files -- _lifecycles/_ - Tasks that can be composed by commands to support the full needs of that command -- _plugins/_ - Custom default plugins maintained by the CLI project -- _layouts/_ - Default layouts and / or pages provided by Greenwood. - - -#### Lifecycles -Aside from the config and graph lifecycles, all lifecycles (and config files and plugins) typically expect a compilation object to be passed in. - -Lifeycles include handling: -- starting a production or development server for a compilation -- optimizing a compilation for production -- prerendering a compilation for production -- fetching external (content) data sources - -## Project Management - -We take advantage of quite a few features on GitHub to assist in tracking issues, bugs, ideas and more for the project. We feel that being organized not only helps the team in planning out priorities and ownership, it's also a great way to add visibility and transparency to those following the project. - -### Project Boards - -Our [sequentially named project boards](https://github.com/ProjectEvergreen/greenwood/projects) help us organize work into quarterly buckets that will generally include a small handful of "top line" goals and objectives we would like to focus on for that particular time box. It also serves as a catch-all for the usual work and bug fixes that happens throughout general maintenance of the project. Additionally, we leverage this as a means to shine insight into good opportunities for those interested in contributing as what the Greenwood team would appreciate help with the most. - -### Discussions - -We believe good collaboration starts with good communication. As with most of the open source community, Greenwood is a 100% volunteer project and so we understand the importance of respecting everyone's [time and expectations](https://www.jason.af/setting-expectations) when it comes to contributing and investing in a project. Although we don't mind issues being made, unless the issue is clearly actionable and falls in-line with the motivations and trajectory of the project, then feel free to go ahead an open a [Discussion](https://github.com/ProjectEvergreen/greenwood/discussions) first. - -We encourage discussions as we believe it is better to hash out technical discussions and proposals ahead of time since coding and reviewing PRs are very time consuming activities. As maintainer's, we want to make sure everyone gets the time they are desire for contributing and this this workflow helps us plan our time in advance to best ensure a smooth flow of contributions through the project. - -> _Put another way, we like to think of this approach as **measure twice, cut once**._ - -### Issues -We like to reserve issues for features and requests that are more or less "shovel" ready with clear implementation details at hand. This could include prior discussions with the team or action items coming out from an existing discussion. - -Our standard issue template requests some of the following information to be prepared (where applicable) -1. High Level Overview -1. Code Sample or API Design -1. Links / references for more context - -For bugs, please provide steps to reproduce and expected vs actual behavior including screenshots. - - -### Pull Requests -Pull requests are the best! To best help facilitate contributions to the project, here are some requests: -- We generally prefer an issue be opened first, to help facilitate general discussion outside of the code review process itself and align on the ask and any expectations. However, for typos in docs and minor "chore" like tasks a PR is usually sufficient. When in doubt, open an issue. -- For bugs, please consider reviewing the issue tracker first. -- For branching, we generally follow the convention `/issue--`, e.g. _bug/issue-12-fixed-bug-with-yada-yada-yada_ -- To test the CI build scripts locally, run the `yarn` commands mentioned in the below section on CI. - - -## Continuous Integration -Greenwood makes active use of testing tools like [GitHub Actions](https://github.com/features/actions) and [Netlify deploy previews](https://www.netlify.com/blog/2016/07/20/introducing-deploy-previews-in-netlify/) as part of the workflow. Each time a PR is opened, a sequence of build steps defined _.github/workflows/ci..yml_ are run: -1. Linting: `yarn lint` -1. Running unit tests: `yarn test` -1. Building the Greenwood website: `yarn build` - -A preview is also made available within the status checks section of the PR in GitHub and can be used to validate work in a live environment before having to merge. - - -## Local Development -To develop for the project, you'll want to follow these steps: -1. Have [NodeJS LTS](https://nodejs.org) installed (>= 12.x) and [Yarn](https://yarnpkg.com/) -1. Clone the repository -1. Run `yarn install` -1. Run `yarn lerna bootstrap` - -### NPM Scripts -The [Greenwood website](https://www.greenwoodjs.io/) is currently built by Greenwood, and all files for it are located in this repository under the [_www/_ directory](https://github.com/ProjectEvergreen/greenwood/tree/master/www) workspace. In addition to unit tests, you will want to verify any changes by running the website locally. - -Below are the development tasks available for working on this project: -- `yarn develop` - Develop for the website locally using the dev server at `localhost:1984` in your browser. -- `yarn build` - Builds the website for production. -- `yarn serve` - Builds the website for production and runs it on a local webserver at `localhost:8000` - -### Packages -As mentioned above, Greenwood is organized into packages as a monorepo, managed by [Lerna](https://lerna.js.org/) and [Yarn Workspaces](https://yarnpkg.com/lang/en/docs/workspaces/). You can find all of these in the _packages/_ directory. Each package will manage its own: -- Dependencies -- README -- Test Cases - -Lerna (specifically `lerna publish`) will be used to release all packages under a single version. Lerna configuration can be found in _lerna.json_. - -### Dependencies -To `yarn add` / `yarn remove` packages from anything in _packages/_ or _www/_, please make sure you `cd` into the directory with the _package.json_ first. - -For example -```shell -$ cd packages/cli -$ yarn add -``` - -Yarn workspaces will automatically handle installing _node_modules_ in the appropriate directory. - - -## Testing -[TDD](https://en.wikipedia.org/wiki/Test-driven_development) is the recommended approach for developing for Greenwood and for the style of test writing we use [BDD style testing](https://en.wikipedia.org/wiki/Behavior-driven_development); "cases". Cases are used to capture the various configurations and expected outputs of Greenwood when running its commands, in a way that mimics how a user would themselves be using Greenwood. - -### Running Tests -To run tests in watch mode, use: -```shell -$ yarn test:tdd -``` - -To verify compliance with coverage and watermark thresholds (what CI server runs), use: -```shell -$ yarn test -``` - -Below are some tips to help with running / debugging tests: -- `describe.only` / `it.only`: only runs this block -- `xdescribe` / `xit`: don't run this block -- Uncomment `runner.teardown()` in a case to see the build output without it getting cleaned up post test run -- Use `new Runner(true)` get debug output from Greenwood when running tests - -> **PLEASE DO NOT COMMIT ANY OF THESE ABOVE CHANGES THOUGH** - -### Writing Tests -Cases follow a convention starting with the command (e.g. `build`) and and the capability and features being tested, like configuration with a particular option (e.g. `port`): -```shell -...spec.js -``` - -Examples: -- _build.default.spec.js_ - Would test `greenwood build` with no config and no workspace. -- _build.config.workspace-custom.spec.js_ - Would test `greenwood build` with a config that had a custom `workspace` -- _build.config.workspace-dev-server-port.spec.js_ - Would test `greenwood build` with a config that had a custom `workspace` and `devServer.port` set. - -### Notes -Here are some things to keep in mind while writing your tests, due to the asynchronous nature of Greenwood: -- Make sure to wrap all calls to `TestBed` with `async` -- All usages of `JSDOM` should be wrapped in `async` -- Avoid arrow functions in mocha tests (e.g. `() => `) as this [can cause unexpected behaviors.](https://mochajs.org/#arrow-functions). Just use `function` instead. - -## Supplemental Information - -Some additional information and context to help assist with developing for and contributing to Greenwood. - -### Internet Explorer / Windows -For situations that require testing Internet Explorer or Edge browser, Microsoft provides [Virtual Machines](https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/) for various combinations of Windows and Internet Explorer versions. [VirtualBox](https://www.virtualbox.org/) is a good platform to use for these VMs. - -To test from a VM, you can -1. Run `yarn serve` -1. From the VM, open `http://10.0.2.2:8000` in the browser - -You can disable plugins in _webpack.config.prod.js_ to remove production optimizations for testing purposes. - -### npx Testing -[`npx`](https://www.npmjs.com/package/npx) is a useful CLI utility bundled with NodeJS that allows users to run npm packages globally but without having to install them. - -```sh -% npx http-server -Starting up http-server, serving ./public -Available on: - http://127.0.0.1:8080 - http://192.168.1.153:8080 -Hit CTRL-C to stop the server -``` - -It's featured on the Greenwood website [home page](https://www.greenwoodjs.io/) and in the [Quick Start guide](https://www.greenwoodjs.io/getting-started/quick-start/#command-line) as an option for using Greenwood. There is a [spec for it](https://github.com/ProjectEvergreen/greenwood/tree/master/packages/cli/test/cases/build.default.quick-start-npx) to try and simulate running it. - -You can use it for local development with Greenwood by using [npm link](https://docs.npmjs.com/cli/v7/commands/npm-link) to make `greenwood` available to your local CLI. -```sh -# From the root of the Greenwood repo -$ npm link - -# then say in a test case folder -$ cd packages/cli/test/cases/build.default.quick-start-npx -$ npx greenwood -------------------------------------------------------- -Welcome to Greenwood (v0.14.1) ♻️ -------------------------------------------------------- -Running Greenwood with the command. - - Error: not able to detect command. try using the --help flag if - you're encountering issues running Greenwood. Visit our docs for more - info at https://www.greenwoodjs.io/docs/. -``` - -### Docker -A Docker container is available within the project to use as a development environment if you like. It is configured to use the same image that runs as part of the project's [Continuous Integration environment](https://github.com/ProjectEvergreen/greenwood/blob/master/.github/workflows/ci.yml#L9). - -First make sure you have [Docker installed](https://www.docker.com/products/docker-desktop). - -Then from the root of this repository do the following: -1. Build the container: `$ docker build -t nodejs-dev .` -1. Connect to the container: `$ docker run --name greenwood -v $(pwd):/workspace -i -t nodejs-dev` -1. Now you can run all the usual commands, e.g. - - `$ yarn install` - - `$ yarn build` - - `$ yarn test` - -> _This will create a 2 way binding between your host and the container, so file changes will go both ways between the [host and container](https://gist.github.com/falvarez/71298b07603d32374ceb2845c3eec997)._ - -When you're done with the container: -1. Exit the container: `$ exit` -1. Destroy the container: `$ docker rm greenwood` - -Note: If you have issues running tests due to timeouts, you can increase the setting in [package.json](https://github.com/ProjectEvergreen/greenwood/blob/master/package.json#L23) - -## Release Management - -Lerna is used to manage the publishing of packages within the workspace under a single unified version. Assuming you are logged into **npm** locally and have 2FA access to publish, the following workflows should be used - -After running these commands, Lerna should then prompt you through the steps to pick the version and all packages that will get updated. - -### Alpha Release - -Greenwood typically works on new minor versions in a dedicated branch and release line called "alpha". This leverages NPM's concept of dist tags. While on a release branch, run the following to publish a new _alpha_ release. - -```sh -# from the root of the repo -$ yarn lerna publish --force-publish --dist-tag alpha -``` - -> Typically you will want to select the _Custom Preminor_ option from the list, which Lerna should appropriately yield the expected version. - -### Standard Release - -For a normal release (e.g. "latest") the following command can be run from the mainline branch of the repo. -```sh -# from the root of the repo -$ yarn lerna publish --force-publish -``` \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 4c51b52e1..67aada496 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,12 +1,24 @@ + + ## Type of Change - + + + ## Summary - + + ## Details + \ No newline at end of file diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index b7732a0df..6b7668902 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -4,9 +4,16 @@ We love contributions and appreciate any help you can offer! --> ## Related Issue + +## Documentation + + + + ## Summary of Changes + -```js -const analyticsId = process.env.NODE_ENV === 'xxx' ? 'UA-123...' : 'UA-345...'; -``` - -> _For more information and complete docs about Greenwood, please visit the [Greenwood website](https://www.greenwoodjs.io/)._ +A Greenwood plugin adding support for [Google Analytics](https://developers.google.com/analytics/) JavaScript tracker. It assumes you already have your own Tracking ID(s) and [can either filter out tracking for everything but your production environment](https://stackoverflow.com/a/1251931/417806) so that local testing doesn't interfere with production data, or use a conditional based `analyticsId` using an environment variable. For more information and complete docs on Greenwood, please visit [our website](https://www.greenwoodjs.dev). +> This package assumes you already have `@greenwood/cli` installed. ## Installation + You can use your favorite JavaScript package manager to install this package. This package assumes you already have `@greenwood/cli` installed. -_examples:_ ```bash # npm -npm install @greenwood/plugin-google-analytics --save-dev +$ npm i -D @greenwood/plugin-google-analytics # yarn -yarn add @greenwood/plugin-google-analytics --dev +$ yarn add @greenwood/plugin-google-analytics --dev + +# pnpm +$ pnpm add -D @greenwood/plugin-google-analytics ``` ## Usage + Use this plugin in your _greenwood.config.js_ and pass in your Google Analytics ID, which can either be a * Measurement ID (**recommended**): ex. `G-XXXXXX` * Tracking ID (legacy): ex. `UA-XXXXXX` @@ -31,7 +30,7 @@ Use this plugin in your _greenwood.config.js_ and pass in your Google Analytics import { greenwoodPluginGoogleAnalytics } from '@greenwood/plugin-google-analytics'; export default { - ... + // ... plugins: [ greenwoodPluginGoogleAnalytics({ @@ -46,10 +45,12 @@ This will then add the Google Analytics [JavaScript tracker snippet](https://dev > _Learn more about [Measurement and Tracking IDs](https://support.google.com/analytics/answer/9539598)_. ## Options + - `analyticsId` (required) - Your Google Analytics ID - `anonymous` (optional) - Sets if tracking of IPs should be done anonymously. Default is `true` ### Outbound Links + For links that go outside of your domain, the global function [`getOutboundLink`](https://support.google.com/analytics/answer/7478520) is available for you to use. Example: diff --git a/packages/plugin-google-analytics/package.json b/packages/plugin-google-analytics/package.json index a345ae9ee..8df7ee589 100644 --- a/packages/plugin-google-analytics/package.json +++ b/packages/plugin-google-analytics/package.json @@ -9,9 +9,10 @@ "keywords": [ "Greenwood", "Static Site Generator", + "Server Side Rendering", "Full Stack Web Development", + "Serverless", "Web Components", - "NodeJS", "Google Analytics" ], "main": "src/index.js", diff --git a/packages/plugin-graphql/README.md b/packages/plugin-graphql/README.md index fb136e301..120fe0c4a 100644 --- a/packages/plugin-graphql/README.md +++ b/packages/plugin-graphql/README.md @@ -2,14 +2,14 @@ ## Overview -A plugin for Greenwood to support using [GraphQL](https://graphql.org/) to query Greenwood's [content graph](https://www.greenwoodjs.io/docs/data/) with our optional [pre-made queries](https://www.greenwoodjs.io/docs/data/#data-client). It runs [**apollo-server**](https://www.apollographql.com/docs/apollo-server/) on the backend at build time and provides a **"read-only"** [**@apollo/client** _"like"_](https://www.apollographql.com/docs/react/api/core/ApolloClient/#ApolloClient.readQuery) interface for the frontend that you can use. +A plugin for Greenwood to support using [GraphQL](https://graphql.org/) to query Greenwood's [content graph](https://www.greenwoodjs.dev/docs/content-as-data/) with our optional pre-made queries custom for GraphQL. It runs [**apollo-server**](https://www.apollographql.com/docs/apollo-server/) on the backend at build time and provides a **"read-only"** [**@apollo/client** _"like"_](https://www.apollographql.com/docs/react/api/core/ApolloClient/#ApolloClient.readQuery) interface for the frontend that you can use. For more information and complete docs on Greenwood, please visit [our website](https://www.greenwoodjs.dev). > This package assumes you already have `@greenwood/cli` installed. ## Caveats -As of now, this plugin requires some form of [prerendering](https://www.greenwoodjs.io/docs/server-rendering/#render-vs-prerender) either through: -1. Enabling [custom imports](https://www.greenwoodjs.io/docs/server-rendering/#custom-imports) or +As of now, this plugin requires some form of [prerendering](https://www.greenwoodjs.dev/docs/reference/rendering-strategies/) either through: +1. Enabling [custom imports](https://www.greenwoodjs.dev/docs/pages/server-rendering/#custom-imports), or 1. Installing the [Puppeteer renderer plugin](https://github.com/ProjectEvergreen/greenwood/tree/master/packages/plugin-renderer-puppeteer). ## Installation @@ -18,10 +18,13 @@ You can use your favorite JavaScript package manager to install this package. ```bash # npm -npm install @greenwood/plugin-graphql --save-dev +$ npm i -D @greenwood/plugin-graphql # yarn -yarn add @greenwood/plugin-graphql --dev +$ yarn add @greenwood/plugin-graphql --dev + +# pnpm +$ pnpm add -D @greenwood/plugin-graphql ``` ## Usage @@ -90,8 +93,6 @@ class HeaderComponent extends HTMLElement { customElements.define('app-header', HeaderComponent); ``` -> _For more general purpose information on content with data in Greenwood, [please see our docs](https://www.greenwoodjs.io/docs/data/)._ - ## Schema The basic page schema follow the structure of the [page data]() structure. Currently, the main "API" is just a list of all pages in your _pages/_ directory, represented as a `Page` [type definition](https://graphql.org/graphql-js/basic-types/). This is called Greenwood's `graph`. @@ -122,9 +123,7 @@ The Graph query returns an array of all pages. import client from '@greenwood/plugin-graphql/src/core/client.js'; import GraphQuery from '@greenwood/plugin-graphql/src/queries/graph.gql'; -. -. -. +// async connectedCallback() { super.connectedCallback(); @@ -138,15 +137,13 @@ async connectedCallback() { ### Collections -Based on [our Collections feature](http://www.greenwoodjs.io/docs/data/#collections) for querying based on collections. +Based on [our Collections feature](http://www.greenwoodjs.dev/docs/content-as-data/collections/) for querying based on collections. ```javascript import client from '@greenwood/plugin-graphql/src/core/client.js'; import CollectionQuery from '@greenwood/plugin-graphql/src/queries/collection.gql'; -. -. -. +// ... async connectedCallback() { super.connectedCallback(); @@ -163,15 +160,13 @@ async connectedCallback() { ### Children -This will return a set of pages under a specific route and is akin to using [`getContentByRoute`](http://www.greenwoodjs.io/docs/data/#data-client). +This will return a set of pages under a specific route and is akin to using [`getContentByRoute`](http://www.greenwoodjs.dev/docs/content-as-data/data-client/#content-by-route). ```javascript import client from '@greenwood/plugin-graphql/src/core/client.js'; import ChildrenQuery from '@greenwood/plugin-graphql/src/queries/children.gql'; -. -. -. +// ... async connectedCallback() { super.connectedCallback(); @@ -200,7 +195,8 @@ query { } ``` -Or within your component +Or within your component: + ```javascript import gql from 'graphql-tag'; // comes with Greenwood diff --git a/packages/plugin-graphql/package.json b/packages/plugin-graphql/package.json index ee4fab929..be3f76a4f 100644 --- a/packages/plugin-graphql/package.json +++ b/packages/plugin-graphql/package.json @@ -9,9 +9,10 @@ "keywords": [ "Greenwood", "Static Site Generator", + "Server Side Rendering", "Full Stack Web Development", + "Serverless", "Web Components", - "NodeJS", "GraphQL", "Apollo" ], diff --git a/packages/plugin-import-commonjs/README.md b/packages/plugin-import-commonjs/README.md index 216f7c83c..c02baa994 100644 --- a/packages/plugin-import-commonjs/README.md +++ b/packages/plugin-import-commonjs/README.md @@ -1,30 +1,36 @@ # @greenwood/plugin-import-commonjs ## Overview -A plugin for Greenwood for loading CommonJS based modules (`require` / `module.exports`) in the browser using ESM (`import` / `export`) syntax. _**Note**: It is highly encouraged that you favor ESM based packages for the cleanest / fastest interop and developer experience. Additional processing time and dependencies are required to handle the conversion._ + +A plugin for Greenwood for loading CommonJS based modules (`require` / `module.exports`) in the browser using ESM (`import` / `export`) syntax. For more information and complete docs on Greenwood, please visit [our website](https://www.greenwoodjs.dev). + +_**Note**: It is highly encouraged that you favor ESM based packages for the cleanest / fastest interop and developer experience. Additional processing time and dependencies are required to handle the conversion._ > This package assumes you already have `@greenwood/cli` installed. ## Installation You can use your favorite JavaScript package manager to install this package. -_examples:_ ```bash # npm -npm install @greenwood/plugin-import-commonjs --save-dev +$ npm i -D @greenwood/plugin-import-commonjs # yarn -yarn add @greenwood/plugin-import-commonjs --dev +$ yarn add @greenwood/plugin-import-commonjs --dev + +# pnpm +$ pnpm add -D @greenwood/plugin-import-commonjs ``` ## Usage -Add this plugin to your _greenwood.config.js_ and spread the `export`. + +Add this plugin to your _greenwood.config.js_: ```javascript import { greenwoodPluginImportCommonJs } from '@greenwood/plugin-import-commonjs'; export default { - ... + // ... plugins: [ greenwoodPluginImportCommonJs() @@ -32,14 +38,13 @@ export default { } ``` -This will then allow you to use a CommonJS based modules in the browser. For example, here is how you could use [**lodash**](https://lodash.com/) (although as mentioned above, in this case, you would want to use [**lodash-es**](https://www.npmjs.com/package/lodash-es) instead.) +This will then allow you to use a CommonJS based modules in the browser. For example, here is how you could use [**lodash**](https://lodash.com/) (although as mentioned above, in this case, you would want to use [**lodash-es**](https://www.npmjs.com/package/lodash-es) instead) ```javascript //