diff --git a/.gitignore b/.gitignore index fd3f32082..01bf495e3 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,6 @@ storybook-static/ custom-elements.json .env -.npmrc .aws .hidden *.lit.ts diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile new file mode 100644 index 000000000..07b1c8287 --- /dev/null +++ b/.gitpod.Dockerfile @@ -0,0 +1,11 @@ +FROM gitpod/workspace-full + +RUN sudo apt-get -qq update + +USER gitpod + +# Fix node version we develop against +ARG OUTLINE_NODE_VERSION=16 +RUN bash -c ". .nvm/nvm.sh \ + && nvm install $OUTLINE_NODE_VERSION" +ENV PATH=/home/gitpod/.nvm/versions/node/v${OUTLINE_NODE_VERSION}/bin:$PATH \ No newline at end of file diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 000000000..05e8525fa --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,43 @@ +image: + file: .gitpod.Dockerfile + +tasks: + - init: | + nvm install 16 + yarn + command: | + nvm install 16 + yarn start + +vscode: + extensions: + - bradlc.vscode-tailwindcss + - pranaygp.vscode-css-peek + - runem.lit-plugin + - silvenon.mdx + - streetsidesoftware.code-spell-checker + +ports: + # Used by Storybook + - port: 6006 + onOpen: open-preview + visibility: private + +github: + prebuilds: + # enable for the master/default branch (defaults to true) + master: true + # enable for all branches in this repo (defaults to false) + branches: true + # enable for pull requests coming from this repo (defaults to true) + pullRequests: true + # enable for pull requests coming from forks (defaults to false) + pullRequestsFromForks: true + # add a check to pull requests (defaults to true) + addCheck: true + # add a "Review in Gitpod" button as a comment to pull requests (defaults to false) + addComment: true + # add a "Review in Gitpod" button to the pull request's description (defaults to false) + addBadge: true + # add a label once the prebuild is ready to pull requests (defaults to false) + addLabel: true diff --git a/.npmrc b/.npmrc new file mode 100644 index 000000000..4fd021952 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +engine-strict=true \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8efaa9ddf..34e5a71d2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,7 +6,13 @@ We have a [Code of Conduct](https://github.com/phase2/outline/blob/next/CODE_OF_CONDUCT.md), please follow it in all interactions with project maintainers and fellow users. -## Setup +## Using Gitpod + +If you have a web browser, you can get a fully pre-configured development environment with one click: + +[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/phase2/outline) + +## Local Setup Run the following steps to ensure your environment is installed and up to date. This assumes you are using [NVM](https://github.com/nvm-sh/nvm) locally to manage your NPM version(s). diff --git a/README.md b/README.md index b897f230b..f1060bcb4 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/from-referrer/) + # Outline Design System Outline is a [web component](https://developer.mozilla.org/en-US/docs/Web/Web_Components) based design system starter kit. Outline is based on the latest technologies and tools to help your component authoring experience and facilitate adoption in your organization. diff --git a/package.json b/package.json index 1e5e8489a..8b7d8b7cc 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,6 @@ ], "license": "BSD-3-Clause", "scripts": { - "preinstall": "npx check-node-version --node $(cat .nvmrc)", "prestart": "yarn prep", "start": "yarn storybook.dev.watch", "prep": "yarn generate.safelist && yarn postcss.storybook && yarn generate.resolved-tailwind && yarn generate.custom-elements && yarn generate.component-css", @@ -69,6 +68,9 @@ "dependencies": { "lit": "^2.0.0-rc.2" }, + "engines": { + "node": ">=16" + }, "devDependencies": { "@babel/plugin-proposal-class-properties": "^7.13.0", "@babel/plugin-proposal-decorators": "^7.14.2",