Skip to content

Commit

Permalink
Add support for Deno (#1446)
Browse files Browse the repository at this point in the history
* testing gh-action

* commit deno code

* bug

* configured name/email of the commit

* deno tag

* gh-action event

* updated readme

* force new release

* force a new commit

* use external repo for deno version

* checkout using a PAT

* try PAT
  • Loading branch information
oscarotero committed Oct 21, 2020
1 parent 72d5608 commit d1931f0
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/deno.yml
@@ -0,0 +1,53 @@
name: Deno

on:
push:
tags:
- "8.*"

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Setup Deno environment
uses: denolib/setup-deno@v2.2.0
with:
deno-version: v1.x

- name: Checkout postcss-deno
uses: actions/checkout@v2
with:
repository: postcss/postcss-deno
token: ${{ secrets.PAT }}

- name: Checkout postcss
uses: actions/checkout@v2
with:
ref: master
path: postcss

- name: Convert the code
run: |
rm -rf deno
deno run --unstable --allow-write --allow-read to_deno.js
deno fmt deno
cp postcss/README.md deno/
cp postcss/CHANGELOG.md deno/
cp postcss/LICENSE deno/
deno test --unstable --allow-read deno/test/*
- name: Get the tag name
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}

- name: Commit the changes and create the tag
run: |
git config user.name deno-conversion
git config user.email github-actions@github.com
git add deno
git commit -m "update code"
git push
git tag ${{ steps.get_version.outputs.VERSION }}
git push --tags
13 changes: 13 additions & 0 deletions README.md
Expand Up @@ -369,6 +369,19 @@ prefixer({ display: 'flex' }) //=> { display: ['-webkit-box', '-webkit-flex', '-
[webpack]: https://webpack.github.io/


### Deno

PostCSS also supports [Deno], the new JavaScript/TypeScript runtime.

```js
import postcss from "https://deno.land/x/postcss/mod.js";
import autoprefixer from "https://dev.jspm.io/autoprefixer";

const result = await postcss([autoprefixer]).process(css);
```

[Deno]: https://deno.land/

### Runners

* **Grunt**: [`@lodder/grunt-postcss`](https://github.com/C-Lodder/grunt-postcss)
Expand Down

0 comments on commit d1931f0

Please sign in to comment.